$startdate
and $enddate
are DateTime objects, not strings. strtotime()
requires a string, and you should simply pass a string instead, like so:
$startdate = "2013-11-15";
$enddate = "2013-11-20";
I’d recommend ugprading to a higher PHP version, if possible. DateTime
class is the best way to go when you’re dealing with times and dates in PHP.
0
solved Warning: strtotime() expects parameter 1 to be string