Switch letters in message (basic cryptology)...

Posted on 16th Feb 2014 by admin

I am trying to switch letters around in a message for an application on my site (see here). The problem is that I can't figure out a way to get it to work.

What I am trying to do is for example switch a with n, and n with a, so that a message like "no one at all" would become "ao oae nt nll". I tried using str_replace plus a couple arrays, but it doesn't work. It instead creates something like "no one nt nll". Anyone have any idea how would I get this to work?

Other forums