I have a text area that inserts its content into a SQL table. Is there a way to keep the formatting of the text and then use it in HTML?
I'll assume you're talking about preserving line breaks.
Either:
Output the text inside a <pre> tag
or
Convert newlines to <br /> tags before insertion to the DB. (E.g. nl2br in PHP).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With