Hi,
string ereg_replace (string pattern, string replacement, string string)
The function ereg_replace replaces a regular expression,ie, it scans a string for matches to a pattern then replaces the matched text with the replacement. I'll explain this with an example:
Suppose u want to change "I had a good time" to "We had a good time" we can do it like this-
$string = "I had a good time";
echo ereg_replace ("I", "We", $string);
This will print "We had a good time".
Coming to ur question if suppose u want to replace everything between 2 tags u can do it like this:
$string = ereg_replace("<p>(.*)</p>", "", $string);
This will replace all the text between the <p> tags with an empty string. I hope this solves ur problem.
Thanks,
Mandy.