I have a string and i want to access ä
character. But it outputs question mark instead of correct character.
Here is my code.
$array = array('ä', 'b', 'c');
$string = 'äbc';
echo $string; // äbc
echo '<br />';
echo $string[0]; // ?
echo '<br />';
echo $array[0]; // ä
Can anyone tell me why?
UPDATED
echo strlen($string); // returns 4
echo mb_substr($string, 0, 1); // ä