php 开发 已知指定的年月份,例如为2013-12,如何获取下个月的月份?
------解决方案--------------------
$first_day_of_month = "2013-12";
$t = strtotime($first_day_of_month);
print_r(array(
date('Y-m',$t),
date('Y-m',strtotime('+ 1 month',$t))
));
------解决方案--------------------
echo date('Y-m', strtotime('2013-12-01 +1 month'));2014-01