I generally use strtotime() as the swiss army knife of PHP date handling. You
give it a string and a timestamp to use as a base, and it gives you back a
new timestamp. So you can say:
strtotime("+6 months", $sometimestamp);
And it will give you back the time stamp six months after $sometimest
Hi,
Sunday, June 17, 2007, 3:54:01 PM, you wrote:
KS> Hi,
KS> RE: Previous and Next Month and Year
KS> This is my code:
KS> $next_month = date('F Y', time()+$month);
KS> $prev_month = date('F Y', time()-$month);
KS> echo "$prev_month \n"; #Result "June 2007"
KS> echo "$next_mont
2 matches
Mail list logo