PHP creating slugify (clean URL) links in simple way? I think this is the simplest way to slugify urls. You have any contra-indication?

function url_clean($str){
        $str = iconv('utf-8', 'us-ascii//TRANSLIT', $str);
        $clean_str = preg_replace(array('/\'|\"/','/ /'),array('','-'),$str);
        return $clean_str;
}
An alternative, simpler way to code your solution is to use the strtr function which "translates characters". Also I made sure to escape the special characters in the regex.

function url_clean($str) {
    $accent = array(' űáéúőóüöíŰÁÉÚŐÓÜÖÍ');
    $clean  = array('-uaeuoouoiUAEUOOUOI');
    $str = strtr($str, $accent, $clean);
    return preg_replace('/[^A-Za-z0-9\-\.]/', '', $str);
}