I want to do the following:
I have a string in a database, it is stored with html tags when being inserted there, so for example, I might have the following string:
<h2>Hello World</h2>
<p>Cras mattis justo vitae diam sagittis ut porta eros aliquam.
Aenean vel nisi et nisl adipiscing blandit.
Donec tempor dictum risus a feugiat.
Nunc ac purus lectus. Morbi in suscipit ipsum.
Ut eu odio eu massa sollicitudin interdum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Maecenas fermentum hendrerit imperdiet.</p>
This is a string I might have in the database, and I want to discard the <h2> part of it.
Now, as far as I know, doing a preg_replace() here, would do the job, but what string pattern do I need to look for?
Many thanks.