DaVuLf Posted August 28, 2006 Share Posted August 28, 2006 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 Link to comment https://forums.phpfreaks.com/topic/18948-forum-formatting-help/ Share on other sites More sharing options...
hitman6003 Posted August 28, 2006 Share Posted August 28, 2006 either [code]echo "<pre>" . $text . "</pre>";[/code] tags around the text, or use the nl2br function.http://www.php.net/nl2br Link to comment https://forums.phpfreaks.com/topic/18948-forum-formatting-help/#findComment-81840 Share on other sites More sharing options...
DaVuLf Posted August 28, 2006 Author Share Posted August 28, 2006 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. Link to comment https://forums.phpfreaks.com/topic/18948-forum-formatting-help/#findComment-81914 Share on other sites More sharing options...
hitman6003 Posted August 28, 2006 Share Posted August 28, 2006 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. Link to comment https://forums.phpfreaks.com/topic/18948-forum-formatting-help/#findComment-81915 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.