how can i write this code in PHP? I tried several things but it wouldnt work. Can u help me please?
return s.split(/\r?\n/).join("<br>");
Thanks!
It looks like you using regular expression. How about this one
echo implode(preg_split('/\r?\n/', $s), '<br>');
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