1
I have a website where shows the day of the event that takes place every Thursday. For this, I did so:
<?php
$data = date("w");
if($data == 4)
{
echo "hoje";
}
else
{
echo date('d', strtotime("next Thursday"));
}
?>
And as a result:
The problem is that we are on 28/07 and the next event falls in August. How would I make it so that if the event is on a day that falls the following month, it automatically shows, otherwise it shows the current month?
Cite more examples!
– novic
Add how many days left and then decrease by the number of days last month. Ex.:
28+4=>32-31=1
– Maury Developer