I have issue with strotime function in php... Here is html example of what i expect.
<select>
<option value="2018-02-26" selected>Feb 26 - March 4</option>
<option value="2018-02-19">Feb 19 - Feb 25</option>
<option value="2018-02-12">Feb 12 - Feb 18</option>
<option value="2018-02-05">Feb 05 - Feb 11</option>
</select>
And here my php code.
for ($i = 0; $i < 7; $i++) {
$option_value = '' . date("Y-m-d", strtotime("this monday - $i week")) . '' . " / " . date("Y-m-d", strtotime("this sunday - $i week")).' / '.$i;
$option_render = date("d/m", strtotime("this monday - $i week")) . " / " . date("d/m", strtotime("this sunday - $i week ")) . '';
}
The problem is that the php code is not rendering what i want... Here is the result of php :
<select>
<option value="2018-03-05">05/03 / 04/03</option>
<option value="2018-02-26">26/02 / 25/02</option>
<option value="2018-02-19">19/02 / 18/02</option>
<option value="2018-02-12">12/02 / 11/02</option>
<option value="2018-02-05">05/02 / 04/02</option>
<option value="2018-01-29">29/01 / 28/01</option>
<option value="2018-01-22">22/01 / 21/01</option>
</select>
</div>