//こう書くと末日に処理が変わってしまう
$next_month = date('Y-m', strtotime('+1 month'));
echo $next_month;

//2017-01-31に1月足すと2017-02-31と内部処理されるので
$next_month = date('2017-01-31', strtotime('+1 month'));
echo $next_month; //2017-03-03

//なので1日に変換してからstortotime
$next_month = date('Y-m', strtotime(date('Y-m-01') . ' +1 month'));


▲上に戻る