\"01\",\"February\"=>\"02\",\"March\"=>\"03\",\"April\"=>\"04\",\"May\"=>\"05\",\"June\"=>\"06\",\"July\"=>\"
If you want to get the value of the select item use:
$month = $_POST['month'];
You question makes it uncertain for me if this is all within the same file or not. If this doesn't solve your problem, please let me know in the comments.
<!DOCTYPE html>
<html lang="en">
<body>
<?php
$month = array("January" => "1",
"February" => "2",
"March" => "3",
"April" => "4",
"May" => "5",
"June" => "6",
"July" => "7",
"August" => "8",
"September" => "9",
"October" => "10",
"November" => "11",
"December" => "12");
?>
<form>
<select name="month">
<?php foreach ($month as $key => $value) { ?>
<option value="<?php echo $value; ?>">
<?php echo $key; ?>
</option>
<?php } ?>
</select>
<input type="submit" name="submit">
</form>
<?php
if (isset($_GET['month'])) {
$inputMonth = $_GET['month'];
$mkt = mktime(0, 0, 0, $inputMonth, 1, date("Y"));
$date2 = date("Y-m-d", $mkt);
$end2 = date("Y") . "-" . $inputMonth . "-" . date('t', strtotime($date2));
?>
<table>
<tr>
<?php
while (strtotime($date2) <= strtotime($end2)) {
$day_num = date('d', strtotime($date2));
$day_name = date('l', strtotime($date2));
$date2 = date("Y-m-d", strtotime("+1 day", strtotime($date2)));
echo "<td>$day_num <br/> $day_name</td>";
}// end while
?>
</tr>
</table>
<?php } //end if
?>
</body>
</html>