Hey guys,
Need some help with structures of inputted text. I been making a forum for my site for a while now, but get problems with output of data.
When a user types a post in a structured way, the output of it after inserting it to the database and calling it back out to display in the forum looses it's structure.
A simple example would be say a user typed:
1)test
2)test
3)test
The output comes out:
1) test 2) test 3) test
Which is obviously not how the user wanted it to be....
How do you maintain text structure, either on the insert or on the echo? I am assuming its upon insert you save the structure with it some how? Hope you can help
Input Structure
Moderator: General Moderators
Re: Input Structure
Have a look at http://php.net/nl2br
-
Snobbery08
- Forum Newbie
- Posts: 13
- Joined: Sun Jan 06, 2008 10:45 am
Re: Input Structure
Thats what i used. But that inserts <br> and when the output goes through the BBCode function upon output which has nothing to do with <br>.......
The output becomes "1) test <br> 2) test <br> 3) test <br>"
What i did was i put it around the text before "insert to database" then again on the output... should i have it only on INSERT to the database or something?
The output becomes "1) test <br> 2) test <br> 3) test <br>"
What i did was i put it around the text before "insert to database" then again on the output... should i have it only on INSERT to the database or something?