$name = 'Today 3? , very/ cold';
$name = strtolower($name);
//$name = preg_replace('/[^a-z0-9s]/','',$name);
$name = preg_replace('/[.s ?,/"]/','_',$name); //change spaces
echo $name;
?>
其中
$name = preg_replace('/[.s ?,/"]/','_',$name); //change spaces
.s ?,/"为正则表达式,表示查找. 空符号 ? / " 这五个字符
其他可自行添加,添加的时候要查找正则手册