php 删除空格 和 回车

 

 

//删除空格 和 回车
function trimall($str){
    $oldchar=array(""," ","\t","\n","\r");
    $newchar=array("","","","","");
    return str_replace($oldchar,$newchar,$str);
}

 

posted @ 2018-04-17 17:18  遇事稳坐钓鱼台  阅读(1273)  评论(0编辑  收藏  举报