How would I check if a date in the format \"2008-02-16 12:59:57\" is less than 24 hours ago?
Just adding another answer, using strtotime's relative dates:
strtotime
$date = '2008-02-16 12:59:57'; if (strtotime("$date +1 day") <= time()) { // Do something }
I think this makes the code much more readable.