FirePhoenix Posted February 24, 2007 Share Posted February 24, 2007 I am making a program to store and retrieve data from a mysql database. When I input the data it works just fine I can format it and space it how ever I want to and if I view it later in a textbox or text area it works fine so I know its storing right. Now I have a page that I just echo this out to and it just spits it all out with the right spaces but none of the line breaks or anything else. I would apriciate it if someone could let me know what i am doing wrong..... Thank you Quote Link to comment https://forums.phpfreaks.com/topic/39897-solved-formatting-issues/ Share on other sites More sharing options...
Yesideez Posted February 24, 2007 Share Posted February 24, 2007 Try this: nl2br($text); Quote Link to comment https://forums.phpfreaks.com/topic/39897-solved-formatting-issues/#findComment-192868 Share on other sites More sharing options...
FirePhoenix Posted February 24, 2007 Author Share Posted February 24, 2007 thank you but where do I put it echo n12br ($text); ??? Quote Link to comment https://forums.phpfreaks.com/topic/39897-solved-formatting-issues/#findComment-192869 Share on other sites More sharing options...
paul2463 Posted February 24, 2007 Share Posted February 24, 2007 where you have <?php echo $text; // where $text is the string you are printing to the page ?> you now have <?php echo nl2br($text); ?> Quote Link to comment https://forums.phpfreaks.com/topic/39897-solved-formatting-issues/#findComment-192870 Share on other sites More sharing options...
FirePhoenix Posted February 24, 2007 Author Share Posted February 24, 2007 wow that worked nicely thank you very much Quote Link to comment https://forums.phpfreaks.com/topic/39897-solved-formatting-issues/#findComment-192872 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.