Iterate through the Alphabet (PHP) If you want to iterate through the alphabet here is the code to do it: Lower Case for ($i=97; $i<=122; $i++) { echo chr($i); } Upper Case for ($i=65; $i<=90; $i++) { echo chr($i); }