function editurl ($string)
{
$string = strtolower($string);
$special = array(
'?','!','.',',',':',';','*','(',')','{','}','[',']','%','#','¹','@','$','^','-','+','/','\\','=','|','"','\'',
'Ą','Č','Ę','Ė','Į','Š','Ų','Ū','Ž','ą','č','ę','ė','į','š','ų','ū','ž');
$normal = array('_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_',
'A','C','E','E','I','S','U','U','Z','a','c','e','e','i','s','u','u','z');
$string = str_replace($special, $normal, $string);
return preg_replace(array('/[^a-zA-Z0-9 -]/', '/[ -]+/', '/^-|-$/'), array('', '-', ''), $string);
}