[thelist] PHP question

Rob Whitener rwhitener at DesignOptions.com
Wed Jan 15 12:34:01 CST 2003

If you can store the text as text only without any HTML, then as you pull it
from the database you will be able to format it with HTML when you process
the page.

-----Original Message-----
From: shawn allen [mailto:shawn at alterior.net]
Sent: Wednesday, January 15, 2003 1:30 PM
To: thelist at lists.evolt.org
Subject: Re: [thelist] PHP question

quoth Andre Genic:
> I need help with a project, what I need to do is to show the first
> paragrph of a news story, say there is a 5 paragraphs is there way to
> only get it down to the short version with php? or is it better just
> to copy and paste the first para into another field in my table and
> just display that and then ad a link to the full story, much thanks.

Depending on whether or not there's HTML in your body text field, it
might prove more difficult than it's worth to try to get the first
"paragraph" out of a large chunk of text. It's much better to do the
latter... That way, you can also customize the summary rather than
relying on the first paragraph of the story to contain all the relevant

shawn allen

* * Please support the community that supports you.  * *

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !

More information about the thelist mailing list