Lets say I have some code:
$text = $_POST[\'secret\'];
$replaces = array(
\'a\' => \'s\',
\'b\' => \'n\',
\'c\' => \'v\',
In the PHP Manual it's clearly explained your problem, at the end of the page they advice to use strtr() which does exactly what you want.
Replace
$text = str_replace(array_keys($replaces),array_values($replaces),$text);
with
$text = strtr($text,$replaces);
which does exactly what you want, it replaces one character with another character.
The documentation of strtr() is here: http://www.php.net/manual/en/function.strtr.php