note 40420 deleted from function.ucwords by nlopess

From: Date: Wed, 03 Mar 2004 17:40:06 +0000
Subject: note 40420 deleted from function.ucwords by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-66186@lists.php.net to get a copy of this message
Note Submitter: mfirat@fibronline.com ---- Turkish characters. <?php function turkishText($text) { $turkish_lower_caracter = array ('ç','ð','ý','i','ö','þ','ü'); $turkish_upper_caracter = array ('Ç','Ð','I','Ý','Ö','Þ','Ü'); $text = str_replace($turkish_lower_caracter, $turkish_upper_caracter, $text); $text = strToUpper($text); $text = explode(" ", $text); for($i=0; $i< count($text); $i++) { $text_title = subStr($text[$i], 0, 1); $text_kalan = subStr($text[$i]. " ", 1); $text_small = str_replace($turkish_upper_caracter, $turkish_lower_caracter, $text_kalan); $text_small = strToLower($text_small); $end.= $text_title . $text_small; } return ($end); } echo turkishText("Ýþçiler çalýþýyor, özellikle þevkle, ülkelerine döneceklermiþ."); ?>

« previous php.notes (#66186) next »