<?php $date1 = strtotime("2019-02-01"); $date2 = strtotime("2019-07-26"); $diff_unix = $date2 - $date1; $diff_days = floor($diff_unix/3600/24); echo $diff_days; // Result: 175
<?php $date1 = strtotime("2019-02-01"); $date2 = strtotime("2019-07-26"); $diff_unix = $date2 - $date1; $diff_days = floor($diff_unix/3600/24); echo $diff_days; // Result: 175