wrathican Posted June 3, 2008 Share Posted June 3, 2008 hey people I have made a forum and im using the nl2br() function so a user can enter things on new lines and they appear that way. what i need is a function to remove each instance of <br /> when it comes to editing the post. any help? Link to comment https://forums.phpfreaks.com/topic/108520-solved-how-to-remove-stuff-from-strings/ Share on other sites More sharing options...
samshel Posted June 3, 2008 Share Posted June 3, 2008 Check if this works ereg_replace("<br />", "\n", $string); Link to comment https://forums.phpfreaks.com/topic/108520-solved-how-to-remove-stuff-from-strings/#findComment-556424 Share on other sites More sharing options...
wrathican Posted June 3, 2008 Author Share Posted June 3, 2008 awesome, thanks! Link to comment https://forums.phpfreaks.com/topic/108520-solved-how-to-remove-stuff-from-strings/#findComment-556431 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.