Mega Code Archive

 
Categories / Php / Code Snippets
 

Number of days between now and a day in the future

<?php // Change this to the day in the future$day = 10; // Change this to the month in the future$month = 12; // Change this to the year in the future$year = 2003; // You do not need to edit below this line // $days is the number of days between now and the date in the future $days = (int)((mktime (0,0,0,$month,$day,$year) - time(void))/86400); echo "There are $days days until $day/$month/$year"; ?>