I have this little bit of code to determine the start weekday for a month ($sweekday) and the end weekday for a month ($eweekday). When I wrote it last month, it worked fine, but for some reason it's passing the wrong values.
$tdays = date("t");
$month = date("n");
$year = date("Y");
$sweekday = getdate(mktime (0,0,0,1,$month,$year));
$sweekday = $sweekday[wday]+1;
$eweekday = getdate(mktime (0,0,0,$tdays,$month,$year));
$eweekday = $eweekday[wday];
$sweekday = 5 (Friday, and the 1st was Saturday.)
$eweekday = 6 (Saturday, and the 31st is on Monday.)
It's an enigma.
Ron