Jump to content

Archived

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

DaVuLf

Forum Formatting Help?

Recommended Posts

Hey there.

I just had a question about the way a forum displays formatting. Currently I've got a TextArea input field (similar to this field here I'd assume) and it seems to store properly in my mySQL table, but when I output the field, it loses all of the formatting, and so looks jumbled together.

Is there any way to make it show something as if i had the php or code wrapper on it that can be found in many forums?

Thanks,
DaVuLF

Share this post


Link to post
Share on other sites
either [code]echo "<pre>" . $text . "</pre>";[/code] tags around the text, or use the nl2br function.

http://www.php.net/nl2br

Share this post


Link to post
Share on other sites
I'm using echo...

I have a query that gets the result from the database, and then echoes (or prints) the result. This is done without formatting. I will look at the link you provided.

Share this post


Link to post
Share on other sites
Hmmm, the forum removed the pre tags that I put in...anyway...it is supposed to say to put < pre > and < /pre > around the text.

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.