2017-03-03 16:00:48 0 Comments PHP Boy.Lee

PHP link break content not display correct in textarea

When use PHP try to output line break content to TextArea, may found "\n\r" not working, can be fixed by change Single Quotation Marks to Double Quotation marks

 

{ Not Wokring }

$outObj['result'] = implode('\n\r\', $randomArr);

 

{ Working }

$outObj['result'] = implode("\n\r", $randomArr);