How to create this type of json?:
{
"Southern", "1040",
"South-West": "710",
"South-East": "692",
"Western": "638",
"North-Western", "448",
"Eastern": "80",
"North-East": "9"
}
I tried this way but you do not get that you need:
$result = mysqli_query($db,"query");
$json_response = array();
while ($row = mysqli_fetch_array($result, MYSQL_NUM)) {
array_push($json_response,array($row[0],$row[1]));
}
mysqli_queryandMYSQL_NUM