<?php for ($i = 0; $i <= 12; $i++) { $start = date_parse("2015-01-30"); $target = mktime(0, 0, 0, $start["month"] + $i, $start["day"], $start["year"]); $tdate = getdate($target); if ($tdate["mday"] < $start["day"]) { $target = mktime(0, 0, 0, $start["month"] + $i + 1, 0, $start["year"]); } printf("+%02d = %s\n", $i, date("Y-m-d", $target)); }
You have javascript disabled. You will not be able to edit any code.