change
for ($i=1; $i<=12; $i++)
to
for ($i=1; $i<12; $i++)
--- Vinesh Hansjee <[EMAIL PROTECTED]> wrote:
> Hi there, can anyone tell me how to fix my code so
> that on the last day of
> the month, my code doesn't repeat the months...
> What the code suppose to do is, makes a drop down
> box from which you can
> select the month, and if its the current month
> the box is already selected.
>
> <select name="month">
>
> <?
>
> for ($i=1; $i<=12; $i++) {
> if ($i == date("m")) {
> print "<option selected value=\"". $i . "\">" .
> date("F",mktime(0,0,0,$i,date("d"),date("Y"))) .
> "</option>";
> } else {
> print "<option value=\"". $i . "\">" .
> date("F",mktime(0,0,0,$i,date("d"),date("Y"))) .
> "</option>";
> }
> }
>
> ?>
>
> </select>
>
> Thanks
> Vinesh
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php