I am looking for a method with one or more php functions for manipulating form textarea data. I want to clean it up by indenting it and wrapping it after a certain length with EOL but not necessarily html <br> or <br /> before it is inserted in My database.

Or alternatively, I want to take a large block of text from the database and clean it up before populating it in a form textarea.

Can anyone offer which series of functions might satisfy these needs?

<?php echo wordwrap(nl2br(htmlentities($text)), 100, "<br>\n", TRUE); ?>

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.