See also ereg(), eregi(), eregi_replace(), str_replace(), and preg_match().
One thing to take note of is that if you use an integer value as the replacement parameter, you may not get the results you expect. This is because ereg_replace() will interpret the number as the ordinal value of a character, and apply that. For instance: