Jump to content

Recommended Posts

Hey everyone,

 

I'm not sure if this is the right forum to post this in, but here it goes. I'm writing a web page with a simple message board for users to discuss a few topics. Everything works fine but when the message text is retrieved from MySQL and put back onto the page the return spaces aren't there. Here's what I mean:

 

"This is the the message body.

 

This is the second line.

 

This is the third line."

 

It shows up my MySQL database exactly as written up there, but when it is put onto the web page it'll show up like:

 

"This is the message body. This is the second line. This is the third line."

 

Obviously I want it to be displayed the way I intended it to be. I know why it's outputting it like that. I was wondering if anyone here could give me some hints on how to parse the message (not sure if that's really what I need to do) or if there are any simple fixes to this problem. Any links to information, tips, or suggestions are welcome. Thanks in advance for anyone's help!

Link to comment
https://forums.phpfreaks.com/topic/123977-help-properly-formatting-text/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.