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

formatting database text

Thread Next
From:
Hughes, Andrew
Date:
February 5, 2002 13:01
Subject:
formatting database text
Message ID:
621350A123673F41B3E891BF3328E82C386091@ATLEX01.turner.com
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
database?
How do I go about doing this?

All suggestions are welcome.

Thanks,
Andrew


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About