note 59803 deleted from function.date by derick
| From: | derick@php.net | Date: | Sun, 15 Jan 2006 12:35:28 +0000 |
| Subject: | note 59803 deleted from function.date by derick | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-101806@lists.php.net to get a copy of this message | ||
Note Submitter: ian_freeworld at yahoo dot com
----
to calculate how many days from this day to the date before
<?
// example you want to calculate date between now and December 12, 2005
$day_now=date("j");
$month_now=date("n");
$year_now=date("Y");
$date_now=date("z", mktime(0, 0, 0, $month_now, $day_now, $year_now));
$day_before=12;
$month_before=12;
$year_before=2005;
$date_before=date("z", mktime(0, 0, 0, $month_before, $day_before, $year_before));
$calculate=$date_now-$date_before;
echo $calculate;
?>
hope it's worth..
thanks..
Younk's
Indonesia