Text from DB to HTML

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jidospod
Forum Commoner
Posts: 33
Joined: Tue Jun 11, 2002 1:05 am

Text from DB to HTML

Post by jidospod »

Hey all,

sorry if this seems like such a novice question, but I have DB tables, people can submit say a story.. and its stored in the DB.. once we review it I want it to get wrote to a static storyxxx.html file. I have the making the file down pat, BUT.. how do I parse the text from the DB into HTML?

For example:

"this is part of the story, it is nice.

This is paragraph two too".

In this situation if I just dump it to HTML its obviously all blank, etc.. how can I make this parse the TEXT from the DB to do the proper <P>, etc...

I appologize if this is discussed somewhere else or it already exists.. I searched for it :)
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

There's a nice tutorial by Kevin Yanks about this at Zend: http://zend.com/zend/tut/tutorial-yank.php
jidospod
Forum Commoner
Posts: 33
Joined: Tue Jun 11, 2002 1:05 am

Post by jidospod »

Thanks muchly, will be sure to read :)
Post Reply