How to limit result to today date.
E.g. we have three dates in this format (Y-m-d H:i:s):
$a = "2011-08-10 23:55:01";
$b = "2011-08-10 00:20:01";
$c = "2011-08-10 09:45:01";
and I don’t want to echo dates that are past. I want just future dates to be shown.
How to make if then statement for future dates only?
Use the strtotime function and compare with the current time given by the time function: