Letters in Loops
| From: | Ben Miller | Date: | Thu, 23 Mar 2006 15:08:28 +0000 |
| Subject: | Letters in Loops | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-232451@lists.php.net to get a copy of this message | ||
In trying to make an alpha list, using the following:
for($i=A;$i<=Z;$i++) {
echo "$i";
}
Produces:
A
B
C...
X
Y
Z
AA
AB
AC...
AX
AY
AZ... all the way to YZ.
What am I doing wrong that it's not stopping at just plain old "Z", without
moving on to "AA" and continuing?