I don’t know the correct syntax to use if i wanted to check if the date is the same as the previous date in a table
I want to echo out a statement if it isnt the same date
I have this statement that gets the difference, how would i produce a statement that checked if there was a difference and echo’d out a string if it was
$interval = $newdate->diff(new DateTime($last_date));
Thanks guys, sorry i can’t provide much code im struggling with syntax
Assuming
$last_dateand$newdateare both DateTime objects you can do a comparison as of PHP 5.2