I am searching for a function in PHP to replace the substrings in a string.
Input string is
<a href="#">Test Link1</a><p class="more">something</p><a href="#">Test Link2</a> <p>some more things</p>
and output string is
<p class="more">something</p> <p>some more things</p>
Here, 'Test Link' caption is dynamic.
Thanks in advance.
See Question&Answers more detail:os