Hi,
RE: Previous and Next Month and Year
This is my code:
$next_month = date('F Y', time()+$month);
$prev_month = date('F Y', time()-$month);
echo "$prev_month <br /> \n"; #Result "June 2007"
echo "$next_month <br /> \n"; #Result "June 2007"
What I am trying to do is get the month and year
based upon a + or - $month value.
The variable $month being "6" for the month of June of
the present year of 2007.
For example ($month -7) would be December 2006,
and ($month +7) would be January 2006.
Please help... Thank you.
Keith
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php