Outputing the first charachter of a UTF-8 array in PHP -
i'm trying pick out single character hebrew array in php.
the str_split function doesn't seem work, , characters within array displayed black diamond question mark inside.
if echo single letter, screen output displays "array".
i tried treating string array , doing this: echo $string[0];. didn't give me different results.
how can pick out first letter of word while working utf-8 encoded format?
you use mb_substr().
$firstchar = mb_substr($str, 0, 1); if echo single letter, screen output displays "array".
it if trying print array.
Comments
Post a Comment