欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

PHP删除字符串中的空格和换行符究极方法

程序员文章站 2022-07-06 10:56:44
//删除空格和回车 function trimall($str){ $qian=array(" "," ","\t",&q...
//删除空格和回车
function trimall($str){
    $qian=array(" "," ","\t","\n","\r");
    return str_replace($qian, '', $str);   
}