I have example string in UTF-8:
$string = "Nový rok";
Now i tried:
echo $string; // output: Nový rok // CORRECT
echo $string[0] // output: N // CORRECT
echo $string[3] // output: � // INCORRECT
Why $string[3]
is incorrect?
I also tried convert string to array by str_split
but results is same. Here is code of my test:
<meta charset="utf-8">
<?php
$string = str_split("Nový rok");
echo $string[3];
?>
Any idea how to get "ý" from array?