Jump to content

nl2br() help


Blekk

Recommended Posts

Hi,

 

I have looked through this forum using force, but I couldn't really find anything that was a lot like my problem.

 

I have created a little website for me and my friends working on a project. I have a little message board thing going on, where you just login, enter the subject and message and it is entered into the MySQL database. This works fine, but the message (which is a textarea when inputting data) comes out all on one line with just spaces inbetween words where there should be new lines.

 

I have looked at nl2br, and so have used it to output the data so that:

 

print nl2br($message);

 

as the data in the MySQL field has new lines in it, but this doesn't seem to work.

 

What is the problem?

 

Thanks,

 

Any reply is appreciated.

Link to comment
https://forums.phpfreaks.com/topic/55122-nl2br-help/
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.