This Code will Place January in the pulldown menu, but Feb-Dec Are place as text beside the pulldown menu... How Do I get the whole array into the pulldown menu?
Code:
<?php # Script 3.7 - Beef.php
function make_calendar_pulldowns(){
// Make th emonths array
$months = array(1 => 'January', 'Feburary', 'March', 'April','May','June','July','August','September','October','November','December');
// Make the months pull down menu
echo '<select name="month">';
foreach ($months as $key => $value) {
echo "<option value=\"$key\">
$value</option>\n";
echo '</select>';
}
}// End of the function definitoin
//create the form tags
echo '<h1>Select a Date:</h1>
<form action = "Beef.php" method = "post">';
// Call the function
make_calendar_pulldowns();
echo '</form>';
?>