K. I can use a text area type field to allow a user to enter multiple lines.

I then insert this data into the db. But when I retrieve the data and echo it out, the new lines are no longer there but are instead treated as spaces...is there any way to preserve that formatting?

    i believe nl2br will help...

    <?php
    $string = "the database return";
    echo nl2br($string);
    ?>
    

    that will help i believe

      Is there some quick way to account for all the HTML formatting types or no? Although nl2br is enough for my purposes.

        I think you'd have to create some function to remove all <br> and other such things that would effect the format of it. I use nl2br and it works great. bold and stuff are fine. Just don't use <br> basically.

          Write a Reply...