I have recently been doing some php programming and have run into a problem
with this code:

<?php

$char = "a";

do {
echo $char++ . "<br/>";
}
while ($char <= "z")

?>

This code, as my colleagues and I have determined, should echo the value a,
then break, then b, then break, then c, etc. However, when I execute the
code I get a through z, aa through az, ba through bz, ca through cz, and so
on and so forth until eventually getting to yz.

Is there a problem with the code, or is it a problem with the php algorithm?

Sorry if this is the wrong place to send this email. If so, can you
redirect me to the correct person to contact?

-Brett Jenson

Reply via email to