Hi,
I think there are several ways but one could be to use mktimestamp and getdate like e.g.
$today = mktime(0,0,0,date("m"),date("d"),date("Y"));
$firstDay=2;
$numDays=0;
while (($theday = mktime(0,0,0,date("m"),$firstDay,date("Y"))) <= $today) {
$dateArray = getDate($theday);
if ($dateArray["weekday"] != "Sunday" && $dateArray["weekday"] != "Saturday")
$numDays++;
}
mktime creates a timestamp for a given date. We walk from the second day, which might be the first work day after the 1st of the month to today and increment a variable if it is not a Saturday or a Sunday.
Regards,
Thomas