I'm having a problem comparing dates. I've tried the following two:
$comic['released'] is a date format in MySQL.Code://tried this: if ($comic['released'] <= date('Y-m-d')) { $date = "Now!"; } else { $date = date('F jS, Y', strtotime($comic['release'])) . "."; } //and this: if (date('Y-m-d', strtotime($comic['released'])) <= date('Y-m-d')) { $date = "Now!"; } else { $date = date('F jS, Y', strtotime($comic['release'])) . "."; }
No matter what, it always prints "Now!"
Where am I going wrong?




Reply With Quote