saturday and sunday will not count as number of days php mysql code example
Example: saturday and sunday will not count as number of days php mysql
$workdays = array();
$type = CAL_GREGORIAN;
$month = date('n');
$year = date('Y');
$day_count = cal_days_in_month($type, $month, $year);
for ($i = 1; $i <= $day_count; $i++) {
$date = $year.'/'.$month.'/'.$i;
$get_name = date('l', strtotime($date));
$day_name = substr($get_name, 0, 3);
if($day_name != 'Sun' && $day_name != 'Sat'){
$workdays[] = $i;
}
}