function DateDiff($interval, $date1, $date2) { // Function roughly equivalent to the ASP "DateDiff" function //convert the dates into timestamps $date1 = strtotime($date1); $date2 = strtotime($date2); $seconds = $date2 - $date1; //if $date1 > $date2 //change substraction order //convert the diff to +ve integer if ($seconds