strtr

strtr -- Translate certain characters.

Description

string strtr(string str, string from, string to);

This function operates on str, translating all occurrences of each character in from to the corresponding character in to and returning the result.

If from and to are different lengths, the extra characters in the longer of the two are ignored.

Example 1. strtr() example

$addr = strtr($addr, "δεφ", "aao");
      

See also ereg_replace().