美文网首页
去除字符串包含的所有空格

去除字符串包含的所有空格

作者: 丶Assassin丨 | 来源:发表于2017-09-25 15:38 被阅读0次

//封装 去除空格函数

public function trimall($str){

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

         $back = array("","","","","");

         return str_replace($front,$back,$str);

}

相关文章

网友评论

      本文标题:去除字符串包含的所有空格

      本文链接:https://www.haomeiwen.com/subject/lfkdextx.html