pickachu Posted October 21, 2008 Share Posted October 21, 2008 i wanted to remove the <br /> tag that are value of the <textarea></textarea>.. remove or replacing this.. Quote Link to comment Share on other sites More sharing options...
discomatt Posted October 21, 2008 Share Posted October 21, 2008 You don't need regex. str_replace( '<br />', '', $subject ); Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted October 24, 2008 Share Posted October 24, 2008 You could do this, it removes the br and places a line break in its place: <textarea><?= str_replace( '<br />', "\n", $subject ); ?></textarea> Quote Link to comment Share on other sites More sharing options...
Maq Posted October 24, 2008 Share Posted October 24, 2008 If you're not using regex for finding a specific string then you should always use str_replace(). Quote Link to comment 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.