Understanding php's logic

Ashley Oviatt ashovi at qwest.net
Tue Apr 6 13:44:02 MDT 2004

 From the php.net site: 

for ($i="A"; $i <= "Z"; $i++) echo "$i<br>";

will actually output A-Z, then begin again with AA, AB, etc. until it 
finishes with YZ.


Ok, this seems weird to me for some reason. Why doesn't the loop stop 
when it reaches the character Z? If you put in a Y in place of the Z, it 
stops at Y.

Why does it do this?


More information about the UPHPU mailing list