is there a quick way to turn this string :
"abcdcba";
into
"1234321";
Ya get what im doing, swapping the letter (uppercase or not) for the number of its position in the alphabet.
z is 26, you get the idea.
dont worry about uppercase or anything, ill ALWAYS be making the string lower case, and stripping anything that isnt a letter out of it (spaces, grammar marks, etc)
if there is a handy php function that will either turn "a" to "1" or "1" to "a", i can write a little function to do it.
im trying to avoid setting up an array of 26 vars where i split apart the string and use comparisons to get the value.