So i have a <textarea> in my form. User can either enter a new line or single line. So when the user views the text it will be showed like how he/she inputs it.
Form
<textarea name="jo_unit" class = 'form-control' required="required" cols = '4'></textarea>
Expected Output
TESTING 1
TESTING 2
TESTING 3
What i get

My code on displaying it
{{ nl2br(@$get['result'][0]->jo_unit_2) }}
Security: This code allows XSS attacks and is not production ready.
use {!! !!}:
{!! nl2br(@$get['result'][0]->jo_unit_2) !!}
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