Mega Code Archive

 
Categories / Php / Strings
 

Ereg_replace() function searches for string and replaces pattern if found

The syntax is: string ereg_replace (string pattern, string replacement, string string) <?     $copy_date = "Copyright 2009";     $copy_date = ereg_replace("([0?9]+)", "2010", $copy_date);     print $copy_date; ?>