php 日期 月份
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