$date1 = #תאריך#; $date2 = #תאריך2#;
$timestamp1 = strtotime($date1); $timestamp2 = strtotime($date2);
$days_difference = floor(($timestamp2 – $timestamp1) / (60 * 60 * 24));
return $days_difference;