Voting

: three plus zero?
(Example: nine)

The Note You're Voting On

Ekin
4 years ago
Using this function for Turkish language is won't work because of multi-byte characters. But you can use some tricks:

<?php
function ucfirst_tr($str) {
$trMap = ['Ğ'=>'ğ','Ü'=>'ü','Ş'=>'ş','İ'=>'i','Ö'=>'ö','Ç'=>'ç','I'=>'ı'];
$str = mb_strtolower(strtr($str, $trMap));
$first = mb_substr($str, 0, 1);
$first = strtr($first, array_flip($trMap));
$first = mb_strtoupper($first);
return
$first . mb_substr($str, 1);
}
?>

<< Back to user notes page

To Top