我想用韩语json。我的语言是英语。问题是它将韩语替换为?????
。我的代码段是:
<?php
$mysqli = new mysqli ( '50.62.209.85:3306', 'local', 'root123', 'android');
// Check if album id is posted as GET parameter
$myq = $mysqli ->query ( 'SELECT id, url, name FROM HollywoodMovies' );
while ( $myr = $myq->fetch_assoc () ) {
$array["items"][] = (array(
'id' => $myr['id'],
'id' => $myr['url'],
'title' => $myr['name'],
));
}
echo json_encode($array);
?>
答案 0 :(得分:0)
string json_encode ( mixed $value [, int $options = 0 [, int $depth = 512 ]] )
参数值:
所有字符串数据必须是UTF-8编码
检查您的数据是否以UTF-8编码