It is possible to use date() and mktime() together to find dates in the future or the past.
Example 3. date() and mktime() example
<?php
$tomorrow = mktime(0, 0, 0, date("m" ) , date("d" )+1, date("Y" ));
$lastmonth = mktime(0, 0, 0, date("m" )-1, date("d" ), date("Y" ));
$nextyear = mktime(0, 0, 0, date("m" ), date("d" ), date("Y" )+1);
?> |