Last updated on November 16th, 2015 at 09:58 am
A simple script for this New Year . This php script will help us find the number of days between two dates. You can give date manually or pass dynamically.
//$start = strtotime('2012-12-31'); $start = time(); $end = strtotime('2013-01-03'); $days_between = ceil(($end - $start) / 86400); echo $days_between;
Here i have given time() as the start variable. Also commented out one section with
//$start = strtotime(‘2012-12-31’);
You can use either one of those according to your convenience.