For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > May 2005 > Re: [PHP-DB] Letters loop









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-DB] Letters loop
Jochem Maas

2005-05-26, 8:56 pm

MIGUEL ANTONIO GUIRAO AGUILAR wrote:
> Hi!!
>
> I wanna a do a for loop with letters, Is this possible?
>
> for ($i = 'A'; $i <= 'Z'; $i++){
> // code
> }


try it.

php -r '
for ($i = "a"; $i < "z"; $i++){ echo $i,"."; } echo "z";'


>
> --------------------------
> MIGUEL GUIRAO AGUILERA
> Logistica R8 - Telcel
> Tel: (999) 960.7994
> Cel: 9931-60000
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com