This will give you an array of the business days for a given month, which should then be pretty easy to work with. (Just do count() on the result for number of workdays.)
<?php
function getBusinessDays($mon, $yr)
{
$result = array();
for($day = 1; checkdate($mon, $day, $yr); $day++)
{
if(date('N', mktime(0,0,0,$mon,$day,$yr)) < 6)
{
$result[] = $day;
}
}
return $result;
}
// test
echo "<pre>".print_r(getBusinessDays(8,2008), 1)."</pre>";