satış yapacağımız bir script için bir kaç gün önce yazmıştık,
buyrun kullanabilirsiniz..
karakter setinizin UTF-8 olduğunu varsayıyorum
& #304; ve & #305; aradaki boşluğu silin kullanırken, forum otamatik çevirme yapıyor.
/*
sef title
*/
if (!function_exists('etitle')) {
function etitle($str) {
$str = str_replace(
array(
htmlspecialchars_decode('& #304;'),
htmlspecialchars_decode('& #305;')
),
array('i','i'),
$str);
$str = preg_replace('#[^\p{L}\p{N}]+#u','__',$str);
$str = @iconv("UTF-8","ASCII//TRANSLIT//IGNORE",$str);
$str = preg_replace('#[^\p{L}\p{N}\__]+#u','',$str);
$str = str_replace('_',' ',$str);
$str = preg_replace('~\s+~',' ',$str);
$str = trim($str);
$str = mb_strtolower($str);
$str = str_replace(' ','-',$str);
return $str;
}
}