Lets say I have some code:
$text = $_POST[\'secret\'];
$replaces = array(
\'a\' => \'s\',
\'b\' => \'n\',
\'c\' => \'v\',
's',
'b' => 'n',
'c' => 'v',
'd' => 'f',
'e' => 'r',
'f' => 'g',
'g' => 'h',
'h' => 'j',
'i' => 'o',
'j' => 'k',
'k' => 'l',
'l' => 'a',
'm' => 'z',
'n' => 'm',
'o' => 'p',
'p' => 'q',
'q' => 'w',
'r' => 't',
's' => 'd',
't' => 'y',
'u' => 'i',
'v' => 'b',
'w' => 'e',
'x' => 'c',
'y' => 'u',
'z' => 'x',
);
for( $i=0,$l=strlen($text);$i<$l;$i++ ){
if( isset($replaces[$text[$i]]) ){
$text[$i] = $replaces[$text[$i]];
}
}
echo "You're deciphered message is: ".$text;
?>