PHP nl2br() in Laravel?
storing line breaks in DB from textarea?
storing space in DB from textarea?
Please help me guys
@rin4ik
<textarea spellcheck="true" rows="5" id="description" class="form-control"></textarea>
how to use it and jquery function code
i use it
{{ nl2br(e($obj->description)) }}
output
oidafnoa ianfpcansf <br /> dg<br /> zsd<br /> gzsd<br /> g<br /> zsdg<br /> szdg
{!! nl2br(e($obj->description)) !!}
it working like a charm thanks.
but when i use space not working
input
aaaaaaa aaaaaaaaaaaaaa
output
aaaaaaa aaaaaaaaaaaaaa
try this
{!! str_replace(' ', ' ', $text !!}
Parse error: syntax error, unexpected ';', expecting ',' or ')'
this works fine {!! str_replace(' ', ' ', $obj->description) !!}
but text are going out from textarea
{!!nl2br(str_replace(" ", " ", $obj->description))!!}
Please or to participate in this conversation.