$year = 2010; $month = 10;
How do I get the previous month 2010-09 and next month 2010-11?
2010-09
2010-11
$date = mktime( 0, 0, 0, $month, 1, $year ); echo strftime( '%B %Y', strtotime( '+1 month', $date ) ); echo strftime( '%B %Y', strtotime( '-1 month', $date ) );