Possible Duplicate:
How to parse and process HTML with PHP?
I am selecting a column from a mySQL table which has a value something like this:
<div class="article news group">
<p class="news_info">18/10/12</p>
<h2>Hello world!</h2>
<p>ertwrt aerteartert</p>
<p>ertaertert</p>
<p>waertwertwertwaertweart</p>
</div>
I now need to only get the 3 p tags from this - so returning:
<p>ertwrt aerteartert</p>
<p>ertaertert</p>
<p>waertwertwertwaertweart</p>
Is there an easy way to do this with php or will I need to use jQuery to remove the unwanted code.
Either way, any ideas how I would do it?