\s+<', preg_replace('/\s+/S', " ", preg_replace("/[\n\r]/", '', $text)) ) ); } }