How to Transform a String from Multi-Line to Single-Line in PHP? zendnwar August 18, 2014 PHP Basic 1 Comment It is very simple. Just add below code. echo str_replace(array(“\r”,”\n”),””, $str); Related Posts Regular Expression Basic Tutorial zendnwar July 27, 2012 Characters Character Description Example Any character except \^$.|?*+() All characters except .. Error Reporting Directives in php.ini zendnwar December 14, 2012 Error Reporting Directives in php.ini To diagnose bugs in your code, you should enable the dire ..