Hi Martin.Schmitz!
On Tue, 30 Oct 2001, [EMAIL PROTECTED] wrote:
> From: [EMAIL PROTECTED]
> Operating system: Linux
> PHP version: 4.0.6
> PHP Bug Type: *Programming Data Structures
> Bug description: 'for()'-error using chars as break
>
> <?PHP
>
> for($i='A'; $i<='Z'; $i++){
> echo $i;
> }
I saw it thousand times... ppl just miss that
"'a string' is 0 when compared to integers".
try this instead:
foreach (range(ord('A'),ord('Z')) as $i) echo chr($i);
ciao
-- teodor
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]