php_b34st Posted August 19, 2006 Share Posted August 19, 2006 I have the following form which allows admins on the site to add news topics. I can retrieve the text from the database and print it where it needs to go, but the problem lies in the formatting of the text for example if a user wanted text to be on 3 lines:onetwothreeinstead the result is one two three. I tried just simply using <pre> but this makes the text exceed the container i have placed it in.Any suggestions? Quote Link to comment Share on other sites More sharing options...
Yesideez Posted August 19, 2006 Share Posted August 19, 2006 Sounds like you're in need of a line break or am I missing something here?Erm, just thought - when echo'ing the text to the browser try this:[code]echo nl2br($variable);[/code] Quote Link to comment Share on other sites More sharing options...
php_b34st Posted August 19, 2006 Author Share Posted August 19, 2006 Yea that works thank you very much for the help Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.