//删除空格和回车
function trimall($str){
$qian=array(" "," ","\t","\n","\r");
return str_replace($qian, '', $str);
}
//多个连续空格只保留一个 function merge_spaces($string){
return preg_replace("/\s(?=\s)/","\\1",$string);
}
2022-07-12 16:56:29
//删除空格和回车
function trimall($str){
$qian=array(" "," ","\t","\n","\r");
return str_replace($qian, '', $str);
}
//多个连续空格只保留一个 function merge_spaces($string){
return preg_replace("/\s(?=\s)/","\\1",$string);
}
下一篇:Sql 按照指定天数时间段查询