php删除字符串中的所有空格

function trimall($str)//删除空格
{
    $qian=array(" "," ","\t","\n","\r");$hou=array("","","","","");
    return str_replace($qian,$hou,$str);    
}

  

posted @ 2015-12-29 16:39  充实地生活着  阅读(1446)  评论(0编辑  收藏  举报