I\'m trying to get the week range using Sunday as the start date, and a reference date, say $date, but I just can\'t seem to figure it out.
$date
For example,
A simple code to return the days from start DateTime and end DateTime. Using gmdate() method you can format date/time.
$start_str_date = strtotime($start_date); $end_str_date = strtotime($end_date); $interval_days = $end_str_date - $start_str_date; $days = gmdate('d',$interval_days); echo $days;