I am trying to get text to enter into a database, but the text needs to have the line breaks that are entered into the textbox for when it is entered into the database, without having to enter <br /> every time there is a line break.
So you want to make line breaks in a textbox and have these turn into <br /> when posted to the database, right?
nl2br() should do it. Just use this function on your string before posting it to the database.
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