Re: Help Me!
| From: | Beau Lebens | Date: | Thu, 01 Feb 2001 04:46:23 +0000 |
| Subject: | Re: Help Me! | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-6302@lists.php.net to get a copy of this message | ||
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;
**bold**
%%italic%%
__underline__
!!titlefont!!
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>
enjoy
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.
Regards
Srinivasan Ranganathan
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
For additional commands, e-mail: php-db-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
Beau Lebens - Web Master
Insurance My Way, Your Friendly Online Broker
(08) 9226 5888
http://www.insurancemyway.com.au/