Entries Tagged 'PHP' ↓

How to capitalize UTF-8 string in PHP?

Sometimes I have to capitalize words in my pages. The problem is these words are encoded in UTF-8. Simple solution to resolve it:

$word = 'kędzierzyn-koźle';
$word = mb_convert_case($word, MB_CASE_TITLE, 'UTF-8');