Most efficient way to get next letter in the alphabet using PHP
The most efficient way of doing this in my opinion is to just increment the string variable. $str=”a”; echo ++$str; // prints ‘b’ $str=”z”; echo ++$str; // prints ‘aa’ As seen incrementing ‘z’ give ‘aa’ if you don’t want this but instead want to reset to get an ‘a’ you can simply check the length … Read more