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

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

  

你可能感兴趣的:(php删除字符串中的所有空格)