Re: When is "z" != "z" ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tedd wrote:
At 1:09 PM -0700 6/4/06, Rasmus Lerdorf wrote:
I agree with [1] and [2], but [3] is where we part company. You see, if you are right, then "aaa" would also be less than "z", but that doesn't appear so.
Of course it is.

php -r 'echo "aaa" < "z";'
1

You missed the point, why does --

for ($i="a"; $i<="z"; $i++)
  {
  echo($i);
   }

-- not continue past "aaa"? Clearly, if "aaa" is less than "z" then why does the loop stop at "yz"?

I thought I explained that a few times.  The sequence is:

a b c ... x y z aa ab ac ... yx yy yz za zb zc ... zy zx zz aaa aab

Your loop stops at yz and doesn't get anywhere near aaa because za > z

-Rasmus

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux