note 74178 deleted from ref.strings by bobby
| From: | bobby@php.net | Date: | Wed, 28 Mar 2007 20:34:47 +0000 |
| Subject: | note 74178 deleted from ref.strings by bobby | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-124896@lists.php.net to get a copy of this message | ||
Note Submitter: webmaster @ fixnytix dot com
----
Hi,
I am grabbing a field out of a db and I'd like to parse out just the text that sits within the
first set of <p> tags (including the p tags). The field happens to be the body content of a
web page.
So... when I pull the db field, I get all the text on the page... I need to trim that down to just
the first paragraph. Any ideas?
$teaser = $row_pageData['body'] is where I load in the body content. I can't seem to
find a built in function to just say:
$teaser = magic('1st occurance of <p>','1st occurance of
</p>',$row_pageData['body']);
Thanks