How do I detect a carriage return/new line character in a text area in PHP?
I want to replace them with <br />
tags before storing it in the database.
There's a php constant for this:
When do I use the PHP constant "PHP_EOL"?
Also look into nl2br()
.
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