rondog Posted January 18, 2009 Share Posted January 18, 2009 I have a form that is just editing a news article. I am applying nl2br() on the body so the user can input line breaks. The problem is if they edit it more than once, it keeps adding a new <br/> tag. Is their a way to prevent that? Link to comment https://forums.phpfreaks.com/topic/141370-solved-help-with-nl2br/ Share on other sites More sharing options...
Mchl Posted January 18, 2009 Share Posted January 18, 2009 Only use nl2br for displaying. It is not needed for editing. Link to comment https://forums.phpfreaks.com/topic/141370-solved-help-with-nl2br/#findComment-739958 Share on other sites More sharing options...
rondog Posted January 18, 2009 Author Share Posted January 18, 2009 ok thank you ill try that Link to comment https://forums.phpfreaks.com/topic/141370-solved-help-with-nl2br/#findComment-739967 Share on other sites More sharing options...
rondog Posted January 18, 2009 Author Share Posted January 18, 2009 you were right, thanks! Link to comment https://forums.phpfreaks.com/topic/141370-solved-help-with-nl2br/#findComment-739969 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.