Getting substring of text for first paragraph

From: Date: Mon, 13 May 2002 02:47:25 +0000
Subject: Getting substring of text for first paragraph
Groups: php.general 
Request: Send a blank email to php-general+get-97290@lists.php.net to get a copy of this message
I want to do the following: Big chunk of text is stored in variable $a. Paragraph breaks are signalled by two line breaks. I want to just extract the first paragraph (i.e., all the text up to the first set of two line breaks) from $a. How would I do this? I tried exploding $a into an array, then doing a while loop inside a for loop, but it was taking WAY too long to execute (it was timing out). Is there an easy way to do this that I'm just overlooking? Thanks, Steven

« previous php.general (#97290) next »