Re: When is "z" != "z" ?
| From: | Robert Cummings | Date: | Sun, 04 Jun 2006 20:53:11 +0000 |
| Subject: | Re: When is "z" != "z" ? | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-237377@lists.php.net to get a copy of this message | ||
On Sun, 2006-06-04 at 16:45, 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"?
Because right after 'yz' there is 'zz' and 'z' is neither less than
nor
equal to 'zz'.
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com
|
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'