the way i have attacked a similar situation in the past was to create my 
own formatting system - kind of a pseudo-html set-up, which made use of 
conventions like;


etc etc
then you can save the article directly into the DB, as a text or whatever, 
and when you print it out, do something like;

echo specialTxtFormat($articleBody);

a function which would include a call to nl2br() as well as the replacement 
of things like

**bold** for <b>bold</b>


At 04:13 AM 2/1/01 +0000, Sridhar Ranganathan wrote:
>Hi Netlanders
>I have just undertaken a web site construction project. It is a devshed 
>like site that serves articles on various topics. I am using LAMP - 
>Linux/Apache/MySQL/PHP 4. I have a table that contains info about each 
>article. I think I have three options...(or do I have more that I dont 
>know of?!)
>         1. Store the article body in the database as a LONGTEXT or BLOB
>         2. Separate plain text file
>         3. Separate HTML formatted file
>No matter whether the file is in the database or as a separate file, 
>should it be formatted?
>If it is plain text, how do I make distinctions between bold text and 
>normal text?
>(Will fread() using PHP give me '\n' and other such characters too?)
>If it is HTML formatted, I would loose some control over the look and I 
>would have to copy and paste the plain text article and make it a HTML file.
>What should I do?
>I know I have already asked this question and got some answers. But, when 
>I proceeded with the project, I kept comming back to this one point. A 
>long answer might help. Looking forward to your help.
>Srinivasan Ranganathan
>Get Your Private, Free E-mail from MSN Hotmail at
>PHP Database Mailing List (
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

Beau Lebens - Web Master
Insurance My Way, Your Friendly Online Broker
(08) 9226 5888

PHP Database Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to