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