I want to echo
the dates from Mo,Tu,We,Th,Fr,Sa,Su of the next week.
My code looks like this at the moment:
$date_monday = date("Y-m-d", strtotime('next monday'));
$date_tuesday = date("Y-m-d", strtotime('next tuesday'));
$date_wednesday = date("Y-m-d", strtotime('next wednesday'));
$date_thursday = date("Y-m-d", strtotime('next thursday'));
$date_friday = date("Y-m-d", strtotime('next friday'));
$date_saturday = date("Y-m-d", strtotime('next saturday'));
$date_sunday = date("Y-m-d", strtotime('next sunday'));
Problem is that for example the date of sunday
is wrong, because the next sunday is tomorrow, but I want the date from the sunday of the following week.
Is there a way to set the PHP date to sunday and calculate the days with the new date?
$mon = $mon->format('d/m/Y');
and so on? but i just get the same date for every day (30/11/2013)... – Measles