for ($i="A";$i<="Z";$i++)
will output A to Z , but it will also output AA, AB, AC until it finishes with ZZ.
To just output A to Z do the following
for ($i="A";$i!="AA";$i++)
for ($i="A";$i<="Z";$i++)
will output A to Z , but it will also output AA, AB, AC until it finishes with ZZ.
To just output A to Z do the following
for ($i="A";$i!="AA";$i++)