Source Code:
(back to article)
<?php $string = "Hello World!"; $translation_rules = array("H" => "J", "W" => "Z"); $translated_string = strtr($string, $translation_rules); echo $translated_string;
Result:
Report an issue