1 2 3 4 5 6 7 8
<?php $input = '123456'; echo $output = strtr($input, '0123456789', 'abcdefghij'); echo "\n"; $input = 'bcdefg'; echo $output = strtr($input, 'abcdefghij', '0123456789');
1 2
bcdefg 123456