PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
How can I un-nl2br something? Like, for a news script, when I'm adding news in a textarea, I want it to nl2br then put it in the database. Then on my news page, I want it to echo what ever is in the database. Now, if I want to edit the news post, I go back to the textarea, but I don't want to see the <br /> and other HTML. How could i un-nl2br it? Thanks.
Just don't nl2br() it before putting it in the database. Only nl2br() on the news page before echoing it out, the textarea on the edit page will then still show the original newlines (that are in the db).