RE: [PHP] weird behaviour with ("Z" <= "Z")
| From: | Christian Dechery | Date: | Wed, 11 Jul 2001 01:32:22 +0000 |
| Subject: | RE: [PHP] weird behaviour with ("Z" <= "Z") | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-57277@lists.php.net to get a copy of this message | ||
that is exactly what I did... it worked perfectly...
At 01:40 11/7/2001 +0900, Maxim Maletsky wrote:
I would rather go for the following solution:____________________________ . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developerfor($i=ord('A'); $i<=ord('Z'); $i++) echo chr($i).' ';I know it's same and even slower as it takes two more functions to execute, but at least it is visually closer to what Christian was trying to do. Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) maxim@phpbeginner.com www.phpbeginner.com -----Original Message----- From: Jack Dempsey [mailto:dabigdemp@hotmail.com] Sent: Wednesday, July 11, 2001 1:13 AM To: 'Maxim Maletsky'; lemming@vento.com.br; php-general@lists.php.net Subject: RE: [PHP] weird behaviour with ("Z" <= "Z") Try this: <? for($i=65;$i<=90;$i++){$str .= chr($i) . " ";} echo $str; ?> jack -----Original Message----- From: Maxim Maletsky [mailto:php-general@phpbeginner.com] Sent: Tuesday, July 10, 2001 12:10 PM To: lemming@vento.com.br; php-general@lists.php.net Subject: RE: [PHP] weird behaviour with ("Z" <= "Z") what??? are you sure it does that to you? You sound so confident that it confuses my knowledge that for loop should be counting integers, not strings ("Z" is a string and there's nothing bigger or lower it) -maxim maletsky -----Original Message----- From: Christian Dechery [mailto:lemming@vento.com.br] Sent: Wednesday, July 11, 2001 12:45 AM To: php-general@lists.php.net Subject: [PHP] weird behaviour with ("Z" <= "Z") "Z" <= "Z" is true right?? then why this weird thing happens when I have this code: for($letter="A"; $letter<="Z" ; $letter+) echo " $letter"; it should output " A B C D E ..... W X Y Z" right? but it outputs " A B C D E ... W X Y Z AA AB ... YW YX YY YZ". why?. [ Christian Dechery ]. Webdeveloper @ Tá Na Mesa! . Listmaster @ Gaita-L . http://www.tanamesa.com.br -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net