It's useful to replace text within strings too. For example, it can be handy for manipulating strings containing data, or when formatting text for displaying in a Web page.PHP gives you a couple of useful functions for replacing text in a string:
str_replace() searches for one string of text and replaces it with another.
substr_replace() replaces text at a specified position within a string.
However, your help is needed on how to replace chunks of text with these two fubctions, thanks.