1 2 3 4
<?php $pairs = array('A' => 'B', 'B' => 'C'); echo str_replace(array_keys($pairs), array_values($pairs), 'AB');
1
CC