Greetings all. I'm looking for a way of determining the next character in sequence, given a single character string ranging from a-z.
The way I'm currently doing it:
Given a single-character string $key, I get the next character in the sequence by doing this: $key2 = chr(ord($key) + 1). It works fine for my purposes thus far. I'm just wondering if there's a better/more efficient way of handling this.
For what it's worth, this line will probably only run once every time the script is called.
Getting the next char in a sequence
Moderator: General Moderators