ereg_replace() function searches for string and replaces pattern if found. : ereg_replace « String « PHP






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








Related examples in the same category

1.back-reference parenthesized substrings
2.ereg_replace
3.ereg_replace-2
4.ereg_replace.php
5.Using ereg_replace