I am trying to convert a simple dropdown from html to php.
The Html was originally
Select a shipping option:
<select name="shipping">
<option value="5">Overnight - $5</option>
<option value="3">First Class - $3</option>
<option value="1" selected="selected">Third Class - $1</option>
</select><br>
It will essentially do the same thing as a php however I need to convert it. I have been trying to get it to work but the dropdown box is simply just blank.
[php] Select a shipping option:
Choose one
<?php
function shipping($value, $text){
foreach($text as $x)
echo "$x";
} ?>
<option value="
<?php echo
shipping("5", "Overnight - $5");
shipping("3", "First Class - $3");
shipping("1", "Third Class - $1"); ?>" <?php echo $x;
?> </option>[/php]