Actually, what I want to do, is find out what day of the week the first of the month falls on. For example, October 2002 = the 1st was on a Tuesday. Here's the code I've been trying:
$thefirst=date("Ynj",strtotime("$y$m1"));
$dayFirst=date("D",strtotime($thefirst));
This is a calendar.
the variable "$y" is the 4 digit year the user is looking at, and the "$m" variable is the month. Those variables are either going to be the current month based on the timestamp, or a different month based on the querystring. I need to get the weekday for the first of whatever month it ends up on, so I can begin to lay out the calendar starting on the correct day.
I have this whole thing working in ASP (i know, ewwww) but I am going to run it on my own Apache server so I need to turn the whole thing into PHP.