[thelist] PHP question

shawn allen shawn at alterior.net
Wed Jan 15 12:31:00 CST 2003


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
info.

--
shawn allen
  mailto://shawn@alterior.net
  phone://415.577.3961
  http://alterior.net
  aim://shawnpallen




More information about the thelist mailing list