Re: weird behaviour with ("Z" <= "Z")
| From: | Vitali Falileev | Date: | Tue, 10 Jul 2001 16:00:29 +0000 |
| Subject: | Re: weird behaviour with ("Z" <= "Z") | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-57180@lists.php.net to get a copy of this message | ||
Hello Christian,
10 July, 2001, 18:44:53, you wrote:
CD> "Z" <= "Z" is true right??
Yes, right, but "Z" = "Z" and your code makes next iteration, then
$letter = "AZ" and "AZ" is LESS that "Z", because "A" <
"Z".
:)
CD> then why this weird thing happens when I have this code:
CD> for($letter="A"; $letter<="Z" ; $letter+)
CD> echo " $letter";
CD> it should output " A B C D E ..... W X Y Z" right?
CD> but it outputs " A B C D E ... W X Y Z AA AB ... YW YX YY YZ".
CD> why?
--
Best regards,
Vitali mailto:falileev@itos.eu.org