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 What are the differences between GET and POST methods in form submitting? zendnwar July 24, 2012 What are the differences between GET and POST methods in form submitting? On the server side, t .. Explain the difference between $var and $$var? zendnwar July 25, 2012 Explain the difference between $var and $$var? $var is a variable and $$var is a variable of an ..