xyn Posted July 19, 2006 Share Posted July 19, 2006 Hi,I wanted to insert some things into my database so the linebeaks do not get removed.basically to send a private message and When I input:[sup]Hi,How are you?ps. test[/sup]it looks like:[sup]Hi, How are you? p.s test[/sup]Does anyone know what I can do? Quote Link to comment Share on other sites More sharing options...
akitchin Posted July 19, 2006 Share Posted July 19, 2006 when you're echoing it from the database, use nl2br(). Quote Link to comment Share on other sites More sharing options...
xyn Posted July 19, 2006 Author Share Posted July 19, 2006 Thanks, would that be:[code=php:0]<?PHPecho 'nl2br(CODE HERE)';[/code] Quote Link to comment Share on other sites More sharing options...
akitchin Posted July 19, 2006 Share Posted July 19, 2006 [code]echo nl2br($variable_containing_the_post);[/code] Quote Link to comment Share on other sites More sharing options...
xyn Posted July 19, 2006 Author Share Posted July 19, 2006 oh yes :P thank you 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.