Contact: aviboots(AT)netvision.net.il
40,760 questions
53,134 answers
573 users
$s = "php \n javascript nodejs \n c c++ python \n c#\n"; $s = trim(preg_replace('/\s\s+/', ' ', $s)); echo $s; /* run: php javascript nodejs c c++ python c# */
$s = "php \n javascript nodejs \n c c++ python \n c#\n"; $s = trim(str_replace(" ", " ", str_replace("\n", "", $s))); echo $s; /* run: php javascript nodejs c c++ python c# */