Tuesday, October 16, 2007

PHP useful get date function


<?php
$now = time();
$tomorrow  = mktime(0, 0, 0, date("m", $now)  , date("d", $now)+1, date("Y", $now));
$lastmonth = mktime(0, 0, 0, date("m", $now)-1, date("d", $now),  date("Y", $now));
$nextyear  = mktime(0, 0, 0, date("m", $now),  date("d", $now),  date("Y", $now)+1);
?>