note 40420 added to function.ucwords
| From: | mfirat at fibronline dot com | Date: | Wed, 03 Mar 2004 14:00:52 +0000 |
| Subject: | note 40420 added to function.ucwords | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-66164@lists.php.net to get a copy of this message | ||
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þ.");
?>
----
Manual Page -- http://www.php.net/manual/en/function.ucwords.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+40420
Delete -- http://master.php.net/manage/user-notes.php?action=delete+40420&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+40420&report=yes
Search -- http://master.php.net/manage/user-notes.php