Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
In the first option, you are accessing the $i-th element of the array, and in the second, you are accessing the 3rd character in this element. If you want to get exactly the element in the string, then use this:
$str="строка";
$chrArray=preg_split("//u", $str, -1, PREG_SPLIT_NO_EMPTY);
echo $chrArray[2];
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question