Copy code The code is as follows:
function create_slug($string){
$slug=preg_replace('/[^A- Za-z0-9-]+/', '-', $string);
return $slug;
}
http://www.bkjia.com/PHPjc/321855.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/321855.htmlTechArticleCopy the code The code is as follows: function create_slug($string){ $slug=preg_replace('/[^A-Za -z0-9-]+/', '-', $string); return $slug; }...