Getting differences between dates quickly in PHP or MySQL

I recently needed a way to figure out the difference, in days, between two dates. Here is how I did it. Using PHP: $expireDate = "2006-02-07";   $year = substr($expireDate, 0, 4); $month = substr($expireDate, 5, 2); $day = substr($expireDate, 8, 2);   $splitExpireDate = (mktime(0, 0, 0, $month, $day, $year)); $today = (mktime(0, 0,… Continue reading Getting differences between dates quickly in PHP or MySQL