这是MySQL数据库中的数据
用于检索它的相应PHP代码
$query = "SELECT * FROM `states` ORDER BY `NAME`";
$result = mysqli_query($connection, $query);
$json_response = array();
while ($row = mysqli_fetch_array($result, MYSQL_ASSOC)) {
$field_info = mysqli_fetch_fields($result);
foreach ($field_info as $value) {
$row_array[$value->name] = $row[$value->name];
}
array_push($json_response, $row_array);
}
echo json_encode($json_response, JSON_UNESCAPED_UNICODE);
JSON输出正在打印????而不是actual text
帮助! 这是JSON输出