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 is substr() in php? zendnwar July 20, 2012 substr() This function returns a part of a string. substr(string,start,length) string : T .. 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 ..