I have an array and can't really narrow down the right way to print everything out.
Array:
$month = Array(
"1" => "January",
"2" => "February",
"3" => "March",
"4" => "April",
"5" => "May",
"6" => "June",
"7" => "July",
"8" => "August",
"9" => "September",
"10" => "October",
"11" => "November",
"12" => "December"
);
What I Tried:
function monthList() {
require "config.php";
echo '<select name="month" title="Choose A Month">';
foreach ($month as $i => $value) {
echo '<option value="'.the_month_#_here.'">'.$month[$i].'</option>';
}
echo '</select>';
}
Which works fine for pulling out the name but how would i pull out the number associated with it in the array? Thats what I need as the option value
.