How to find number of days between two dates using PHP?
function howManyDays($startDate,$endDate) { $date1 = strtotime($startDate." 0:00:00"); $date2 = strtotime($endDate." 23:59:59"); $res = (int)(($date2-$date1)/86400); return $res; }