[PHP] Months of the year

2003-01-06 Thread Craig
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 eg list labellist value February 200202 March 2002 03 || || January 2003

RE: [PHP] Months of the year

2003-01-06 Thread David Freeman
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... select name=st_month style=width: 80px class=forms ?PHP $curr_month = date(n, mktime()); for ($x = 1; $x = 12; $x++) { $month_name

Re: [PHP] Months of the year

2003-01-06 Thread liljim
Another solution: $month_now = date(n); echo select name=\month\\n; for($i=$month_now, $j=0; $i=($month_now+12); $i++,$j++) { echo option value=\$i\; if($i == $month_now) { echo selected; } echo . date(F Y, mktime(0, 0, 0, $month_now+$j, 1, date(Y))) . /option\n; } echo