Jump to content

Archived

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

masgas

adding line break

Recommended Posts

Hi!

I'm working on a forum. And in the message writing area, when I hit "enter" to place a line break or two, it appears correctly in the text box. However, when I print the messages with php this line break doesn't show...

any ideas why?

thank you for your help.

Share this post


Link to post
Share on other sites
use the nl2br() function on the [b]output[/b]. It converts 'newlines' to html br tags.

[code]echo nl2br($message);[/code]

Share this post


Link to post
Share on other sites
using smilies and formatting text is as simple as that?

do you know of any tutorial for these stuff?

Share this post


Link to post
Share on other sites

×

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.