function editurl ($string)
{
$string = strtolower($string);
$special = array(
'?','!','.',',',':',';','*','(',')','{','}','[',']','%','#','¹','@','$','^','-','+','/','\\','=','|','"','\'',
'à','á','â','ã','ä','å','¸','ç','è','é','ê',
'ë','ì','í','î','ï','ð','ñ','ò','ó','ô','õ',
'ú','û','ý',' ','æ','ö','÷','ø','ù','ü','þ','ÿ');
$normal = array('_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_',
'a','b','v','g','d','e','e','z','i','y','k',
'l','m','n','o','p','r','s','t','u','f','h',
'j','i','e','_','zh','ts','ch','sh','shch',
'','yu','ya');
$string = str_replace($special, $normal, $string);
return preg_replace(array('/[^a-zA-Z0-9 -]/', '/[ -]+/', '/^-|-$/'), array('', '-', ''), $string);
}