Hola
Copiado y pegado del manual de php.
string ereg_replace ( string pattern, string replacement, string string)
$string = "This is a test";
echo ereg_replace( " is", " was", $string );
echo ereg_replace( "( )is", "\\1was", $string );
echo ereg_replace( "(( )is)", "\\2was", $string );
|