So I have a database which stores a date-time value. I want to find out if the date is in the past - I don't care about the time part in this instance, just the date.
So I have the following code at the moment
//this is the current date
$today = strtotime(date("Y-m-d"));
//this is the date from the database
$gameDate = strtotime($rec[0])
if (strtotime($rec[0]) < $today) {
I feel like I am not doing this in the most accepted way, but my brain hurts from too much data and I was hoping someone could give me a pointer as to the 'correct'approach.