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 .. if Statement Uses else zendnwar July 23, 2012 if Statement uses else When working with the if statement, you will often want to define an alt ..