Jump to content

help properly formatting text


HockeyDevil07

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

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.