strtr

strtr

(PHP 4, PHP 5, PHP 7)

strtrTranslate characters or replace substrings

Description

string strtr ( string $str , string $from , string $to )
string strtr ( string $str , array $replace_pairs )

If given three arguments, this function returns a copy of str where all occurrences of each (single-byte) character in from have been translated to the corresponding character in to, i.e., every occurrence of $from[$n] has been replaced with $to[$n], where