- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$time = strtotime("first day of ".$monthname." ".$year);
while($time <= strtotime("last day of ".$monthname." ".$year)) {
if((date('w',$time) + 1) % 7 > 1) { //It's a weekday. 0 = Saturday, 1 = Sunday.
echo date('jS',$time)." ".$monthname;
}
$time += (24*60*60); //Advance One Day
}
?>