squiblo Posted January 22, 2010 Share Posted January 22, 2010 A user posts some data into the database using <textarea>, but if there is a line break in the data that they enter, it uses this "<br />" how can i stop it from posting "<br />" and get it to post "<br>" instead. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/189453-nl2br/ Share on other sites More sharing options...
mapleleaf Posted January 22, 2010 Share Posted January 22, 2010 $changedbr = str_replace('<br />', '<br>', $inputfromtextarea); Quote Link to comment https://forums.phpfreaks.com/topic/189453-nl2br/#findComment-1000034 Share on other sites More sharing options...
laffin Posted January 22, 2010 Share Posted January 22, 2010 <br /> is xhtml compliant <br> isnt they produce the same results tho Quote Link to comment https://forums.phpfreaks.com/topic/189453-nl2br/#findComment-1000036 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.