I didn't see the OP, but:

for($i = 'A';  $i != 'Z';  $i = chr(ord($i) +1)){
  echo "\t<option value=\"$i\">$i</option>\n";
}


On 5/26/05, Stephen Johnson <[EMAIL PROTECTED]> wrote:
> Then this is what I would suggest.
> 
> $alph = array('*', 'A', 'B','C'...etc) ;
> 
> $i=0;
> Echo"<Select name=foo>";
> While($alph[$i]){
>   echo"<option value=$alph[$i]>$alph[$i]";
>   $i++;
> }
> Echo"</Select>";
> 
> On 5/25/05 9:54 PM, "MIGUEL ANTONIO GUIRAO AGUILAR"
> <[EMAIL PROTECTED]> wrote:
> 
> > Yes, because I will create a <select> field within the for loop, and the
> > options of the select should be letters.
> >
> > --------------------------
> > MIGUEL GUIRAO AGUILERA
> > Logistica R8 - Telcel
> > Tel: (999) 960.7994
> > Cel: 9931-60000
> >
> > ----- Mensaje original -----
> > De: Stephen Johnson <[EMAIL PROTECTED]>
> > Fecha: Miércoles, Mayo 25, 2005 9:49 pm
> > Asunto: Re: [PHP-DB] Letters loop
> >
> >>
> >> Why?
> >>
> >> If you need to do a loop that runs 26 times just set your high
> >> value for 26.
> >>
> >> Is there some reason you need to use letters ?
> >>
> >>
> >>
> >> On 5/25/05 8:37 PM, "MIGUEL ANTONIO GUIRAO AGUILAR"
> >> <[EMAIL PROTECTED]> wrote:
> >>
> >>> Hi!!
> >>>
> >>> I wanna a do a for loop with letters, Is this possible?
> >>>
> >>> for ($i = 'A'; $i <= 'Z'; $i++){
> >>> // code
> >>> }
> >>>
> >>> --------------------------
> >>> MIGUEL GUIRAO AGUILERA
> >>> Logistica R8 - Telcel
> >>> Tel: (999) 960.7994
> >>> Cel: 9931-60000
> >>
> >> --
> >> Stephen Johnson
> >> The Lone Coder
> >>
> >> [EMAIL PROTECTED]
> >> http://www.thelonecoder.com
> >>
> >> *Continuing the struggle against bad code*
> >> --
> >>
> >>
> >>
> >
> >
> 
> --
> Stephen Johnson
> The Lone Coder
> 
> [EMAIL PROTECTED]
> http://www.thelonecoder.com
> 
> *Continuing the struggle against bad code*
> --
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to