While trying to print A-Z...

This spews A-Z, then AA-YZ, then stops, most likely from a timeout.
<?php
  for ($x = 'A'; $x <= 'Z'; $x++)
  {
    echo "$x\n";
  }
?>

This works as expected.
<?php
  for ($y = 0, $x = 'A'; $x <= 'Z', $y < 26; $y++, $x++)
  {
    echo "$x\n";
  }
?>

Most likely the first one hits the execution time-limit, and that's
why it finally stops.   What I can't figure out is why it would do
A-Z and then start over at AA since the $x <= 'Z' should kill the
loop.  Removing the single quotes (trying for ASCII values) 
doesn't fix the problem...

-Mike




-- 
PHP General 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]

Reply via email to