«Privet Anton» => «privet-anton»
function seo_url($string, $seperator='-') {
$string = strtolower($string);
$string = preg_replace("/[^a-z0-9_\s-]/", $seperator, $string);
$string = preg_replace("/[\s-]+/", " ", $string);
$string = preg_replace("/[\s_]/", $seperator, $string);
return $string;
}