Forum Moderators: coopster

Message Too Old, No Replies

multiple select arrays presented neatly in HTML tag in one line

         

Flolondon

12:04 pm on Mar 21, 2006 (gmt 0)

10+ Year Member



$cars = $HTTP_POST_VARS['cars'];
echo "0) ".$cars[0];
echo "1) ".$cars[1];
echo "2) ".$cars[2];
echo "2) ".$cars[3];
echo "2) ".$cars[4];

echo " <td>Cars</td>\n";
echo " <td bgcolor=\"#00CCFF\">$cars;</td>\n";
echo " </tr>\n";

How do I present the results of a mutiple drop down neatly in HTML tag in one line as opposed to one variable. Please help

Flolondon

1:00 pm on Mar 21, 2006 (gmt 0)

10+ Year Member



<td>car</td>\n";
echo " <td bgcolor=\"#00CCFF\">You ordered $cars[0] ="red"; $cars[1] ="blue"; $cars[2] ="white"; $cars[3] ="green"; $cars[4] ="silver";</td>\n";
echo " </tr>\n";

what have i done wrong the script is not working

coopster

4:13 pm on Mar 21, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Since you are inside of a table column element you may just want to put breaks (<br />) in between each entry.

scriptmasterdel

11:21 am on Mar 23, 2006 (gmt 0)

10+ Year Member



You want a list of posted variable?

$cars = $HTTP_POST_VARS['cars'];

foreach($cars as $car)
{
echo $car.'<br>';
}

add table formatting if needed ....

... is this what you are looking for?

Flolondon

11:18 pm on Mar 24, 2006 (gmt 0)

10+ Year Member



thanks

scriptmasterdel

8:04 am on Mar 27, 2006 (gmt 0)

10+ Year Member



no problem, did that help?