I have a problem with difference between two days.
How is it possible to get number of days?
Here is my code,
$start = date('Y-m-d', strtotime("+1 day"));
$end = date('Y-m-d', strtotime("+7 day"));
I have a problem with difference between two days.
How is it possible to get number of days?
Here is my code,
$start = date('Y-m-d', strtotime("+1 day"));
$end = date('Y-m-d', strtotime("+7 day"));
I use Pure PHP :
$start = date('Y-m-d', strtotime("+1 day"));
$end = date('Y-m-d', strtotime("+7 day"));
$diff = abs(strtotime($start) - strtotime($end));
$days = floor($diff/60/60/24);
$total = sprintf("%d days\n", $days);
return $total; // 6 days