for($x=0; $x<12; $x++)
{
$month = mktime(0, 0, 0, date(\"m\")+$x, date(\"d\"), date(\"Y\"));
$key = date(\'m\', $month);
$monthname = date(\'F\', $mo
Here is a simple script to go forward 12 months from the current date. It includes the year with it.
# Set Number of Months to Traverse
$num_months = 12;
# Set Current Month as the 1st
$current_month = date('Y-m').'-01';
for ($count = 0; $count <= $num_months; $count++) {
# Fetch Date for each as YYYY-MM-01
$dates[] = date('Y-m', strtotime($current_month.' + '.$count.' Months')).'-01';
}
You could turn this into a select list with the current month selected by dropping this in:
echo '';