Shoora
2/18/2016 - 2:46 PM

«Privet Anton» => «privet-anton»

«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;
}