xyn Posted July 10, 2006 Share Posted July 10, 2006 Hi guys,In MYSQL Is it possible toautomatically detect line breaks instea dof using "<br>" example:i want to write:Hey dude, [color=yellow]<br>[/color]Please can You help me.And instead of having to place <br> it automatically realises it. Quote Link to comment https://forums.phpfreaks.com/topic/14228-line-breaks/ Share on other sites More sharing options...
ShogunWarrior Posted July 10, 2006 Share Posted July 10, 2006 Do you mean adding [b]<br />[/b] when outputting to a browser? Quote Link to comment https://forums.phpfreaks.com/topic/14228-line-breaks/#findComment-55839 Share on other sites More sharing options...
xyn Posted July 10, 2006 Author Share Posted July 10, 2006 yeah, basically replacing a line break with <br> when outputting... Quote Link to comment https://forums.phpfreaks.com/topic/14228-line-breaks/#findComment-55844 Share on other sites More sharing options...
GingerRobot Posted July 10, 2006 Share Posted July 10, 2006 use the function nl2br() on the text from your database. Quote Link to comment https://forums.phpfreaks.com/topic/14228-line-breaks/#findComment-55847 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.