PHP Ferrari PHP Ferrari - 2 months ago 9
PHP Question

Finding the number of days between two dates

How to find number of days between two dates using PHP?

Answer
<?php

     $now = time(); // or your date as well
     $your_date = strtotime("2010-01-01");
     $datediff = $now - $your_date;
     echo floor($datediff/(60*60*24));

?>
Comments