note 110430 added to function.ucwords
| From: | omer dot olmez at googlemail dot com | Date: | Sun, 21 Oct 2012 12:18:25 +0000 |
| Subject: | note 110430 added to function.ucwords | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-191456@lists.php.net to get a copy of this message | ||
function strtolowerTr($string) {
$low=array("Ã" => "ü", "Ã" =>
"ö", "Ä" => "Ä", "Å" => "Å",
"Ã" => "ç", "İ" => "i", "I" =>
"ı");
return strtolower(strtr($string,$low));
}
function ucwordsTr($str) {
$str = $this->strtolowerTr($str);
$arr = explode(' ', $str);
$new = array("Ã", "Ã", "Ä", "Å",
"Ã", "İ", "I");
$old = array("ü", "ö", "Ä", "Å",
"ç", "i", "ı");
foreach($arr as $foo) {
$first = str_replace($old, $new, mb_substr($foo, 0, 1));
$newStr[] = ($first . strtolower(mb_substr($foo, 1)));
}
return ucwords(implode(' ', $newStr));
}
----
Server IP: 69.147.83.199
Probable Submitter: 78.189.207.12
----
Manual Page -- http://www.php.net/manual/en/function.ucwords.php
Edit -- https://master.php.net/note/edit/110430
Del: integrated -- https://master.php.net/note/delete/110430/integrated
Del: useless -- https://master.php.net/note/delete/110430/useless
Del: bad code -- https://master.php.net/note/delete/110430/bad+code
Del: spam -- https://master.php.net/note/delete/110430/spam
Del: non-english -- https://master.php.net/note/delete/110430/non-english
Del: in docs -- https://master.php.net/note/delete/110430/in+docs
Del: other reasons-- https://master.php.net/note/delete/110430
Reject -- https://master.php.net/note/reject/110430
Search -- https://master.php.net/manage/user-notes.php