How do I remove entire characters from a string starting from a particular string position to another position, and shift the rest to merge with this starting position?
I'm working with HTML contents. So take this for example.
</a></h4><p class="pdesc">When a private satellite encounters .... and it is found to ...</p></div></div>.....<p class="pdesc">Before leavingon his .... </p> ...... <p class="pdesc"> .... </p>
So now I want to remove all characters in between
<p class="pdesc"> - to - </p>.
of every occurrence.
I can search for this (strpos) and get the starting and the ending positions, but then manually deleting them and shifting strings from then on will be too tedious.
Is there a built in function or a simple way to do it?