I have a drop down list and would like to fill it with 12 months starting from whatever the current month is:
EG: Current month is July 2005
I would like the list to show:
July 2005 August 2005
. . . July 2006
Can anyone help please?
Thanks
bb
$months = 12; for ($i = 0; $i <= $months; ++$i) { echo "<option>" . date("F Y", strtotime("now +$i months")) . "</option>\n"; }
that could do the trick