John McCAIN“We have enemies for whom no attack is too cruel...”
Barack OBAMA“You know, my faith is one that admits some doubt...”
Posted
on Friday, December 11th, 2009 and is filed under php snippets code.
You can follow any responses to this entry through the RSS 2.0 feed.
You can trackback from your own site.
This will calculate and show how many days there are from the current date to a date in the future that you define.
<?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";
?>
Originally posted 2009-02-21 01:57:21. Republished by Old Post Promoter