I'm currently using the following code to calculate the next month:
$nextMonth = date("m",strtotime("+1 months"));
If the current date is March 31 (03), this code gives me "05" which is actually 2 months away from the current date. I would like it to return April (04) instead.
How can I achieve this?
See Question&Answers more detail:os