Örnek bir Türkçe karekter temizleyici fonksiyon:
function temizle($temiz = null){
$temiz = strtolower($temiz);
$degis1 = array('€','é','ß','@', 'İ','Ö','Ü','Ğ','Ç','Ş','ö','ü','ğ','ç','ş','_',' ','--','---',' - ','ı','&', '"',',','ç','ü','ı','ş','Ş','Ö','ğ');
$degis2 = array('e','e','b','a','i','o','u','g','c','s','o','u','g','c','s','-','-','-','-','-','i','','','-','c','u','i','s','s','o','g');
$temiz = str_replace($degis1,$degis2,$temiz);
$temiz = preg_replace("@[^A-Za-z0-9\-_]+@i","",$temiz);
$temiz = preg_replace(array('~^-+|-+$~', '~-+~'), array('', '-'), $temiz);
return $temiz;
}