I had been using nl2br to post a textarea to a MySQL database. When I view the post on a page all is well (ie - the <br> tags have been added).
What I want to do now is echo that info back into a textarea for editing, but have it remove the <br> tags and keep the line breaks. Right now it echoes in the <br> tags and the line breaks so when I repost to the database the lines get doubled. The cure right now is to manually delete all the <br> tags.
Is there a better way to echo the info to the textarea and strip the <br> tags?
Thanks.