Home >Web Front-end >JS Tutorial >php remove all spaces in string
php deletes all spaces in the string
is actually an extension of the trim function
trim can only delete spaces on both sides of the string
function trimall($str)//删除空格 { $qian=array(" "," ","\t","\n","\r");$hou=array("","","","",""); return str_replace($qian,$hou,$str); }