I have the following code that return's the next 13 Mondays from today's date.
for($i=1; $i<=13; $i++){
echo date("Y-m-d", strtotime('+'.$i.' Monday'))."<br>";
}
I want to be able to amend this so it not only shows the next 13 Mondays but the Monday that has just past.
I tried amending the code as follows but I then get two instances of the next Monday returned.
for($i=-1; $i<=13; $i++){
echo date("Y-m-d", strtotime('+'.$i.' Monday'))."<br>";
}
Data returned.
2015-04-13
2015-04-20 //<--
2015-04-20
2015-04-27
2015-05-04
2015-05-11
2015-05-18
2015-05-25
2015-06-01
2015-06-08
2015-06-15
2015-06-22
2015-06-29
2015-07-06
2015-07-13
Any ideas on how I achieve this?