Top "Strtr" questions

strtr is a php function that translates characters in a string, either by using an additional "to" and "from" translation string, or a single to=>from key=>value array.

When to use strtr vs str_replace?

I'm having a hard time understanding when strtr would be preferable to str_replace or vice versa. It seems that …

php string str-replace strtr
A better way to replace emoticons in PHP?

Right now I am using this function for emoticons: function emoticons($text) { $icons = array( ':)' => '<img …

php emoticons strtr
How do I do a strtr on UTF-8 in PHP?

I'm looking for a UTF-8 compatible strtr for PHP.

php unicode utf-8 strtr