I get an UTF-8 string from db, and trying to echo its first character:
$title = $model->title;
echo $title[0];
I get: �
What's wrong?
There are several things you need to consider:
header('Content-Type: utf-8');
]mb_internal_encoding("UTF-8");
mb_substr
instead of array index notation