So I have an array as follows:
$months = array(
'01' => 'January',
'02' => 'Febuary',
'03' => 'March',
'04' => 'April'
);
I am putting these into a form select and would like to do the following:
<option value="01">January</option>
for each variable in the $months array.
Right now I have the following code with the result of: <option value="">January</option>
<?php foreach ($months as $month): ?>
<option value=""><?php echo $month; ?></option>
<?php endforeach; ?>
I'm not really sure how to make use of the first variable in the array. Or if that is even possible. What is teh easiest way to do what I'm trying to do?