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 Allowed memory size of 134217728 bytes exhausted (tried to allocate 24 bytes) zendnwar August 26, 2013 This is memory limit problem. You can solve your problem several way. Answer 1 : ini_set('mem .. 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 ..