develooper Front page | perl.beginners | Postings from February 2002

formatting database text

Thread Next
Hughes, Andrew
February 5, 2002 13:01
formatting database text
Message ID:
I have created a news article database where non-technical people can cut
and paste articles to be stored in a mySQL database table.  Everything
works.  However when I display these in a browser, I want to have <p
class="whatever"></p> tags around each paragraph, so that the non-technical
people do not have to worry about adding these tags.  I was thinking the
logic would go something like this:

When displaying the body field of the database, before anything else print
<p class="whatever">

Then, for each blank line print </p><p class="whatever">

Finally, after the last paragraph print </p>

Should I do this when the articles go into or are pulled out of the
How do I go about doing this?

All suggestions are welcome.


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About