Re: [PHP-DB] Letters loop

2005-05-27 Thread Rasmus Lerdorf
Chris wrote: > You could create a string, loop through it's length, then access the $i > character in the string. > > $sAlpha = 'ABCDEF...XYZ'; > for($i=0;$i<26;++$i) > { >$sLetter = $sAlpha{$i}; >// code > } range() is a powerful function for creating such strings. You don't need to loo

RE: [PHP-DB] Letters loop

2005-05-27 Thread Rob Agar
hi Miguel > I wanna a do a for loop with letters, Is this possible? > > for ($i = 'A'; $i <= 'Z'; $i++){ > // code > } you can, but it doesn't do what you think it should do. Apparently it gets to Z, restarts with AA, AB, AC etc and continues like that until it hits YZ. feck knows why :-/ hth

Re: [PHP-DB] Letters loop

2005-05-27 Thread Chris
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 } -- MIGUEL GUIRAO AGUILERA Logistica R8 - Telcel Tel: (999) 960.7994 Cel: 9931-6 No, but there are multiple ways this ca

RE: [PHP-DB] Letters loop

2005-05-27 Thread Juffermans, Jos
mportantly) as expected: "; } ?> By the way, this code froze my browser: "; } ?> Jos -Original Message- From: MIGUEL ANTONIO GUIRAO AGUILAR [mailto:[EMAIL PROTECTED] Sent: 26 May 2005 05:38 To: php-db@lists.php.net Subject: [PHP-DB] Letters loop Hi!! I wanna a do a

Re: [PHP-DB] Letters loop

2005-05-26 Thread Rasmus Lerdorf
eceive an integer as a parameter and it > returns it's corresponding character. > But it will work!!! > > -Original Message- > From: Bastien Koert [mailto:[EMAIL PROTECTED] > Sent: Jueves, 26 de Mayo de 2005 08:28 a.m. > To: [EMAIL PROTECTED]; php-db@lists.php.

RE: [PHP-DB] Letters loop

2005-05-26 Thread Bastien Koert
nope chr ( int ascii ) takes the integer ord ( string string ) takes the string bastien From: Miguel Guirao <[EMAIL PROTECTED]> To: php-db@lists.php.net Subject: RE: [PHP-DB] Letters loop Date: Thu, 26 May 2005 09:22:56 -0500 Thanks!! I think the ord() function should receive an i

RE: [PHP-DB] Letters loop

2005-05-26 Thread Miguel Guirao
hp-db@lists.php.net Subject: RE: [PHP-DB] Letters loop try for ($i =ord( 'A'); $i <= ord('Z'); $i++){ // code } bastien >From: MIGUEL ANTONIO GUIRAO AGUILAR <[EMAIL PROTECTED]> >To: php-db@lists.php.net >Subject: [PHP-DB] Letters loop >Date: Wed, 25 May 200

RE: [PHP-DB] Letters loop

2005-05-26 Thread Bastien Koert
try for ($i =ord( 'A'); $i <= ord('Z'); $i++){ // code } bastien From: MIGUEL ANTONIO GUIRAO AGUILAR <[EMAIL PROTECTED]> To: php-db@lists.php.net Subject: [PHP-DB] Letters loop Date: Wed, 25 May 2005 20:37:47 -0700 Hi!! I wanna a do a for loop with letters, Is

Re: [PHP-DB] Letters loop

2005-05-26 Thread Jochem Maas
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

[PHP-DB] Letters loop

2005-05-25 Thread MIGUEL ANTONIO GUIRAO AGUILAR
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-6 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://w