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 PHP? zendnwar July 18, 2012 What is PHP? Devised by Rasmus Lerdorf in 1994,PHP is a programming language that allows buildi .. How to get random value in an array ? zendnwar June 3, 2014 It is very simple. PHP random array function : array_rand() http://php.net/manual/en/function.a ..