I have a simple User Brief input on my website.
However, when a user enters a brief, and for example hits return a couple of times...
like that, when I display the data on a page from the database the returned lines are ignored. Displaying the data back into a textarea they are still there.
How can I get round this with-out installing complicated WYSIWYG text inputs?
Text Area
Moderator: General Moderators
- AKA Panama Jack
- Forum Regular
- Posts: 878
- Joined: Mon Nov 14, 2005 4:21 pm
Use the PHP function nl2br to display the text..
That will convert all new lines to <br> so it will display properly.
Code: Select all
echo nl2br($yourtextvariable);