Date range array excluding the Sunday & the holiday in PHP
问题 I have a function which returns all the dates between two dates in an array, But I need to exclude Sundays in that array. public function dateRange($first, $last, $step = '+1 day', $format = 'd/m/Y' ) { $dates = array(); $current = strtotime($first); $last = strtotime($last); while( $current <= $last ) { $dates[] = date($format, $current); $current = strtotime($step, $current); } return $dates; } After excluding the Sundays, I have a table where I will be storing some dates, I need to exclude