note 74178 added to ref.strings

From: Date: Wed, 28 Mar 2007 19:41:38 +0000
Subject: note 74178 added to ref.strings
Groups: php.notes 
Request: Send a blank email to php-notes+get-124894@lists.php.net to get a copy of this message
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 ---- Server IP: 216.194.113.175 Probable Submitter: 199.46.198.231 (proxied: 138.127.222.125) ---- Manual Page -- http://www.php.net/manual/en/ref.strings.php Edit -- https://master.php.net/note/edit/74178 Del: integrated -- https://master.php.net/note/delete/74178/integrated Del: useless -- https://master.php.net/note/delete/74178/useless Del: bad code -- https://master.php.net/note/delete/74178/bad+code Del: spam -- https://master.php.net/note/delete/74178/spam Del: non-english -- https://master.php.net/note/delete/74178/non-english Del: in docs -- https://master.php.net/note/delete/74178/in+docs Del: other reasons-- https://master.php.net/note/delete/74178 Reject -- https://master.php.net/note/reject/74178 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#124894) next »