Here is the Data in my MySQL DB
And the corresponding PHP code to retrieve it
$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 output is printing ???? instead of actual text
Help !
Here is JSON Output