nerden almıştım hatırlamıyorum ama türkçe için
function reformat ( $tmptitle,$tmpdate ) {
$returnstr = "";
$turkcefrom = array("/Ğ/","/Ü/","/Ş/","/İ/","/Ö/","/Ç/","/ğ/","/ü/","/ş/","/ı/","/ö/","/ç/");
$turkceto = array("G","U","S","I","O","C","g","u","s","i","o","c");
//$tmptitle = mb_convert_encoding("$tmptitle","ISO-8859-9");
// Alfanumerik olmayan karekterleri boşluk yap
$tmptitle = preg_replace("/[^0-9a-zA-ZÄzÜŞİÖÇğüşıöç]/"," ",$tmptitle);
// Türkçe harfleri ingilizceye çevir
$tmptitle = preg_replace($turkcefrom,$turkceto,$tmptitle);
// Birden fazla olan boşlukları tek boşluk yap
$tmptitle = preg_replace("/ +/"," ",$tmptitle);
// Boşukları - işaretine çevir
$tmptitle = preg_replace("/ /","-",$tmptitle);
// Tüm beyaz karekterleri sil
$tmptitle = preg_replace("/\s/","",$tmptitle);
// Karekterleri küçült
$tmptitle = strtolower($tmptitle);
// Başta ve sonda - işareti kaldıysa yoket
$tmptitle = preg_replace("/^-/","",$tmptitle);
$tmptitle = preg_replace("/-$/","",$tmptitle);
// Tarih'i biçimlendir.
$tmpdate = date("/Y/m/d/",$tmpdate);
$returnstr = $tmpdate . $tmptitle;
return $returnstr;
}