What is the best way to exchange alpha characters for special characters? (a = !, b = ", c = £, ...)
I am working with an API that takes three text inputs as a letter and creates an image with effects.
One of the styles must have three characters, the middle character must be uppercase, the last character must be lowercase, but the first character must be a special character.
I am using PHP to change the second and third characters, which is light enough, (lcase / ucase)
But the first one is a little more complicated, since how would I do it, would it be 26 commands
... I'm sure there must be a way to do this with an array?
A=! B=" C=# D=$ E=% F=& ...
Is there an easy way to put both sets into an array and "swap" the values?
source to share