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; ?>