<?php $initialDate = "2011-07-31"; for($i=1; $i<=5; $i++) { echo date('Y-m-d', strtotime('last day of -' . $i . ' month', strtotime($initialDate))) . "\n"; }
You have javascript disabled. You will not be able to edit any code.