I have a pretty simple question. I know that date("F") gives you the current month name (ie: January). However, I also want the next month too.
I tried date("F+1") and date("F"+1) but doesn't seem to do what I want. How do I do this?
get the date's month number, such as 01 for january.
You need to use mktime
print date("F", mktime(0,0,0,date("m") + 1,1,date("y")));
Do the following:
//get the number for next month $temp = (Date("n") + 1)%12 + 1;
//get a valid timestamp representing this number $stamp = mktime(0,0,0,date("n"),1,date("Y"));
//and this is the magic bit $nextmonth = date("F",$stamp);
hmmm.... one line vs. three, I don't see it?