Scooby08 Posted September 15, 2008 Share Posted September 15, 2008 I'm trying to get my textarea to print out like it is with all the breaks before submitting.. I have used this to get it to print out correctly with the breaks: $notes = nl2br($_POST['notes']); Works great.. The thing is when I go back to edit it again it shows all the br's in the textarea which will confuse those who do not know html.. What can I do to remedy this?? Link to comment https://forums.phpfreaks.com/topic/124266-solved-textarea-breaks-and-editing/ Share on other sites More sharing options...
genericnumber1 Posted September 15, 2008 Share Posted September 15, 2008 store it in plain text using \n instead of <br /> and only use nl2br() right before it is outputted to something other than the textarea. Link to comment https://forums.phpfreaks.com/topic/124266-solved-textarea-breaks-and-editing/#findComment-641697 Share on other sites More sharing options...
Scooby08 Posted September 15, 2008 Author Share Posted September 15, 2008 ahh nice!! worked wonders.. Link to comment https://forums.phpfreaks.com/topic/124266-solved-textarea-breaks-and-editing/#findComment-641709 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.