Seo Forum

Coding & Programming => Programming Forum => Topic started by: chinmay.sahoo on 01-14-2017, 06:27:09

Title: Replacing
Post by: chinmay.sahoo on 01-14-2017, 06:27:09
The ereg_replace( ) function takes a pattern, a replacement string, and a string in which to search. It returns a copy of the search string, with text that matched the pattern replaced with the replacement string:

Code:
Only registered users can see contents. Please click here to Register or Login.
If the pattern has any grouped subpatterns, the matches are accessible by putting the characters \1 through \9 in the replacement string. For example, we can use ereg_replace( ) to replace characters wrapped with and tags with equivalent HTML tags:

Code:
Only registered users can see contents. Please click here to Register or Login.

The eregi_replace( ) function is a case-insensitive form of ereg_replace( ). Its arguments and return values are the same as those for ereg_replace( ).