PHP过滤换行的方法

<pre>

public function trimall($str)

{

$qian = array(" ", " ", "\t", "\n", "\r");

return str_replace($qian, '', $str);

}

</pre>