I have a string like this:
$string = 'this is some random text
<div class="myClass" title="myTitle">this is some random text
again</div> and some more randome text';
Now I would like to remove this content from it:
<div class="myClass" title="myTitle">this is some random text again</div>
But at the same time I would like to store the value of class and the value of title
Any ideas on how to go about this?