empty lines in db, not in 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
eggnogg
Forum Newbie
Posts: 11
Joined: Wed Feb 15, 2006 7:31 pm

empty lines in db, not in html

Post by eggnogg »

hey everybody
so in sending info to a db, with line breaks, from a textarea were the user presses 'enter'
the line breaks are saved in the db without any coding like so:

row 1

row 2



when i retrieve it to html it goes

row 1 row 2


im stripping all html and php tags, so i cant try and use html tags i suppose so how could i go about and maintain the format once rendered on html?

thanks
User avatar
Syntac
Forum Contributor
Posts: 327
Joined: Sun Sep 14, 2008 7:59 pm

Re: empty lines in db, not in html

Post by Syntac »

eggnogg
Forum Newbie
Posts: 11
Joined: Wed Feb 15, 2006 7:31 pm

Re: empty lines in db, not in html

Post by eggnogg »

wow, thanks! :)
Post Reply