PHP 替换函数


function trimall($str)//删除空格

{    

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

return str_replace($qian,$hou,$str);

}

上面自定义函数是将指定内容替换,其中所使用的系统函数为:str_replace

你可能感兴趣的:(PHP,函数)