I am just wondering what the best way to cleanup this code is to make it smaller. Right now its an awful lot of code for what is being done. if($num6 == 1){$num6 = "a";} if($num6 == 2){$num6 = "b";} if($num6 == 3){$num6 = "c";} if($num6 == 4){$num6 = "d";} if($num6 == 5){$num6 = "e";} if($num6 == 6){$num6 = "f";} if($num6 == 7){$num6 = "g";} if($num6 == 8){$num6 = "h";} if($num6 == 9){$num6 = "i";} if($num6 == 10){$num6 = "j";} if($num6 == 11){$num6 = "k";} if($num6 == 12){$num6 = "l";} if($num6 == 13){$num6 = "m";} if($num6 == 14){$num6 = "n";} if($num6 == 15){$num6 = "o";} if($num6 == 16){$num6 = "p";} if($num6 == 17){$num6 = "q";} if($num6 == 18){$num6 = "r";} if($num6 == 19){$num6 = "s";} if($num6 == 20){$num6 = "t";} if($num6 == 21){$num6 = "u";} if($num6 == 22){$num6 = "v";} if($num6 == 23){$num6 = "w";} if($num6 == 24){$num6 = "x";} if($num6 == 25){$num6 = "y";} if($num6 == 26){$num6 = "z";} Code (markup):
Thank you for the response. As I was waiting it hit me to just use the code below: $letters = 'abcdefghijklmnopqrstuvwxyz'; $num6 = "$letters[$num6]";