📅  最后修改于: 2022-03-11 14:54:24.003000             🧑  作者: Mango
function clean($string) {
$string = str_replace(' ', '-', $string); // Replaces all spaces with -.
return preg_replace('/[^A-Za-z0-9\-]/', '', $string); // Removes special characters
}