$from = array('a',
'b',
'c'
);
$to = array('tu',
'mo',
'jo'
);
$original = 'cab';
$new = strtr($original,$from,$to);
или
$replacements = array('a' => 'tu',
'b' => 'mo',
'c' => 'jo'
);
$original = 'cab';
$new = strtr($original,$replacements);
или
$replacements = array('a' => 'tu',
'b' => 'mo',
'c' => 'jo'
);
$original = 'cab';
$new = '';
foreach(str_split($original) as $letter) {
$new .= $replacements[$letter];
}