I am trying to set something up where it will get an array from a database and then use that array as a selection in a drop down form.
This is the code that I have written and it does not work... do you know why?
Thanks! Adam
<--!start of code!-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<head>
<title>Does this cool array work?</title>
</head>
<body>
<select name="food">
<?php
$vegtables = array ("broccoli","carrot","zucchini","eggplant");
foreach ($vegtables as $value)
{
print "<option value="test">"$value"</option>\n\r";
}
?>
</select>
</body>
<--!end of code!-->