How can I get the days of the current week? Eg This week I would like to show the following sentence:
Events from the 15th to the 19th of October
While on 16/10, continue showing from the 15th to the 19th of October. I tried the code below, but when I change the date, it marks the date it was changed.
$p = strtotime("0 week");
echo date('d/m/Y', $p)."<br>";
$u = strtotime("4 days");
echo date('d/m/Y', $u)."<br>";
I also tried this way:
echo date("d-m-Y",strtotime("last Monday"));
echo "<br>";
echo date("d-m-Y",strtotime("next Friday"));
I understand that the problem may be in date('d/m/Y',...)
, but how can I resolve this?