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 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); 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 Link to comment https://forums.phpfreaks.com/topic/189453-nl2br/#findComment-1000036 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.