Jump to content

Multiple lines displayed from mysql string.


elmas156

Recommended Posts

Hello everyone.  I'm creating a website that has a sort of messaging system built in and I'm trying to get the information pulled out of the database to display exactly as it was typed.  For example, if someone types this message:

 

"This is the first line.

This is the second line.

 

And this is two lines below the second line."

(By the way, when I view this message using phpMyAdmin, the message is displayed in the above format.)

 

I would like to have the message displayed the same way when it is queried from the database.  As of now, this is what I'm seeing instead:

 

"This is the first line. This is the second line. And this is two lines below the second line."

 

How can I achieve this?  I would post the code that I'm using, but it's just a basic mysql query to get a variable "$message" then I'm just using echo "$message"; to put it on the page.  Any help to point me in the right direction would be greatly appreciated.  Thanks!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.