There are many questions that were asked on date_diff
PHP function. But mine seems a bit different as I get a rather unusual result. Below is the code I have:
$today = date( 'd-m-Y', strtotime( "now" ) );
$selectDay = date( 'd-m-Y', strtotime( $row->BOOKING_DATE ));
$interval = date_diff( $selectDay, $today );
And the result I get:
Warning: date_diff() expects parameter 1 to be DateTime, string given in...
As you see $today and $selectDay both are dates. Any suggestions? Note: I have PHP version 5.3