public static function slugify($slug)
    {
        $slug = preg_replace('/\xE3\x80\x80/', ' ', $slug);
        $slug = str_replace('-', ' ', $slug);
        $slug = preg_replace('#[:\#\*"@+=;!><&\.%()\]\/\'\\\\|\[]#', "\x20", $slug);
        $slug = str_replace('?', '', $slug);
        $slug = trim(mb_strtolower($slug, 'UTF-8'));
        $slug = preg_replace('#\x20+#', '-', $slug);
        return $slug;
    }
public static function slugify($slug)
    {
        $slug = preg_replace('/\xE3\x80\x80/', ' ', $slug);
        $slug = str_replace('-', ' ', $slug);
        $slug = preg_replace('#[:\#\*"@+=;!><&\.%()\]\/\'\\\\|\[]#', "\x20", $slug);
        $slug = str_replace('?', '', $slug);
        $slug = trim(mb_strtolower($slug, 'UTF-8'));
        $slug = preg_replace('#\x20+#', '-', $slug);
        return $slug;
    }
public static function slugify ( $ slug ) { $ slug = preg_replace ( '/\xE3\x80\x80/' , ' ' , $ slug ) ; $ slug = str_replace ( '-' , ' ' , $ slug ) ; $ slug = preg_replace ( '#[:\#\*"@+=;!><&\.%()\]\/\'\\\\|\[]#' , "\x20" , $ slug ) ; $ slug = str_replace ( '?' , '' , $ slug ) ; $ slug = trim ( mb_strtolower ( $ slug , 'UTF-8' ) ) ; $ slug = preg_replace ( '#\x20+#' , '-' , $ slug ) ; return $ slug ; }
better than urlfriendly because & becomes 'amp' then when
making urls it can be translated?
@param  string $slug
@return string       foo-bar
better than urlfriendly because & becomes amp then when making urls it can be translated?