ไม่นับรวมวันหยุด

<?php
function get_working_days($from_date,$to_date) {
for($from_date,$to_date, $work_day = 0, $i = 86400, $x = $from_date; $x <
$to_date; $i+=86400) {

if(date(“N”,$x) < 6 ) $work_day++;

$x = $from_date + $i;

}
echo “<br/>”;
return $work_day;
}

echo get_working_days(strtotime(“2011-03-01”),strtotime(“2011-04-01”));

?>