Another solution:
$month_now = date("n");
echo "\n";
for($i=$month_now, $j=0; $i<=($month_now+12); $i++,$j++)
{
echo "" . date("F Y", mktime(0, 0, 0, $month_now+$j, 1, date("Y"))) .
"\n";
}
echo "\n";
This will start the month's dropdown on the month of the year through to the
month of th
> How do I create a drop down list that automatically
> generates a list of months for the next 12 months upto and including
this month
This would do it...
$month_name\n";
} else {
echo " $month_name\n";
}
}
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubs
2 matches
Mail list logo