Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-07-2008, 01:16 AM   PM User | #1
jasonc310771
Regular Coder

 
Join Date: Mar 2006
Posts: 478
Thanks: 3
Thanked 0 Times in 0 Posts
jasonc310771 can only hope to improve
echo(htmlspecialchars($message)); shows text in one complete line!

i have the following code which is showing all the text in a single line.

i have this in the variable...

lineone
linetwo
linethree


but then i echo the message prior to inserting in the DB


it shows like this...


lineone linetwo linethree


how do i display it like i typed it with line breaks

i have tried print, fprint and no luck with them

plz help

thanks in advance.
jasonc310771 is offline   Reply With Quote
Old 08-07-2008, 01:19 AM   PM User | #2
Nightfire
Senior Coder

 
Nightfire's Avatar
 
Join Date: Jun 2002
Posts: 4,266
Thanks: 6
Thanked 48 Times in 48 Posts
Nightfire is on a distinguished road
nl2br() is what you're looking for
Nightfire is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:54 AM.


Advertisement
Log in to turn off these ads.