I have found a lot of info on the Date function, but not on how to make it convert the month name to it’s corresponding number.
What I have is a simple form in which the user chooses the month from the drop down and submits it. (ie, October) I need to know how to convert “October” to the number 10 for use in other date functions so I can get the number of days in the month, etc.. in order to generate a calendar based on the users selection.
Htis is what I have so far:
[CODE]
$monthName = $_POST[‘month’];
$year = $_POST[‘year’];
…
$monthNum = date(n, mktime(0, 0, 0, $monthName, 1, $year));
$daysInMonth = date(t, mktime(0, 0, 0, $monthName, 1, $year));
I need to know how to reconcile the month name selction from the drop down to the month number in the mktime function