- var_dump: documentation ( source)
- date: documentation ( source)
- strtotime: documentation ( source)
- header: documentation ( source)
<?php
header('Content-type: text/plain');
foreach(array(1,2) as $n) {
var_dump(date("c",strtotime("first day of +$n months")));
}