furkanmert adlı üyeden alıntı

hocam paylaşım güzelde hantal çalışır

function permalink($string)
{
$find = array('Ç', 'Ş', 'Ğ', 'Ü', 'İ', 'Ö', 'ç', 'ş', 'ğ', 'ü', 'ö', 'ı', '+', '#');
$replace = array('c', 's', 'g', 'u', 'i', 'o', 'c', 's', 'g', 'u', 'o', 'i', 'plus', 'sharp');
$string = strtolower(str_replace($find, $replace, $string));
$string = preg_replace("@[^A-Za-z0-9\-_\.\+]@i", ' ', $string);
$string = trim(preg_replace('/\s+/', ' ', $string));
$string = str_replace(' ', '-', $string);
return $string;
}

şu şekilde arraya sokup daha hızlı işlem yapmak daha dogru.

kulllanımı
$deger = "Bu Türkçe Bir Yazıdır";
echo permalink($deger);


Hocam, php konusunda iyi değilim. Sadece lazım olmuştu kendime göre bir fonksiyon oluşturup paylaştım.

Teşekkür ederim.