Quantcast
Channel: PHP Solutions – Lampdocs.com
Viewing all articles
Browse latest Browse all 18

PHP: strtolower for Russian and Cyrillic

$
0
0

If you need to work with Russian text in PHP, you may notice that functions that are related to CaSe are not working as expected. I mean strtolower, strtouper, ucwords, and so on. In order to get what you need I suggest to use mb_convert functions. Here is the example:

$string = "Строка";
$string = mb_convert_case($string, MB_CASE_LOWER, "UTF-8");
echo $string;

//output is: строка
?>

You can check reference table for functions, I think you will find more useful functions for you.


Viewing all articles
Browse latest Browse all 18

Latest Images

Trending Articles



Latest Images