When trying to code a calendar I've gotten the appropriate number of days in a month to display but the month always starts on Sunday. All I need to figure out is the day of the first week the month starts on so I can offset the display of numbered fields, but nothing I've found in php.net's date() seems to do this. Anyone else had this problem?
$weekday = $date_info['wday']; #weekday (zero based) of the first day of the month
Got this from:
http://www.stargeek.com/php_scripts.php?script=5&cat= calender script
J.
I've used this in the past: $firstDay=date('w',mktime(1,0,0,$month,1,$year));