What is the best way to check if a given date – a string d/mm/yyyy is a past?
When I used strtotime(), it didn’t work well, because of non-American notation.
Of course I might deal with the dates as strings and compare substrings, but there has to be a better way.
if((strtotime('now')-strtotime($date)) > 86400) echo $date;
strtotime() manual
So a simple
str_replace('/', '-', $date)should do the trick.