[Resolved] Date Comparison Problems
I'm having a problem comparing dates. I've tried the following two:
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'])) . ".";
}
$comic['released'] is a date format in MySQL.
No matter what, it always prints "Now!"
Where am I going wrong?