Hello Guys,
I’m trying to display dates in while loop, and echoing them out only as dates “d”, but not full date format “Y-m-d”.
Unfortunately it works correctly only with full date format “Y-m-d”. As soon as I try different formats, loop goes to infinity…
Any ideas how to echo only the date without month and year in this code?
[php]
// Set timezone
date_default_timezone_set(‘UTC’);
// Start date
$date = date(‘Y-m-d’);
// End date
$end_date = date(‘Y-m-d’, strtotime(’+3 days’));
echo ‘
’; echo “$date\n”; echo “ | ”;
[/php]
Thanks,
Raivis