{"cities":[{"city":{"id":1,"name":"Bangalore","status":"Active"}},
{"city":{"id":2,"name":"Mysore","status":"Active"}},... ]}
The above is the JSON format and this is how I fetch from JSON as shown below,
$city=$data['cities'];
$citycount=count($city);
for($i=0;$i<$citycount;$i++)
{
echo $data['cities'][$i]['city']['id'];
}
Now How to fetch JSON values when the format is like below
{"result":[["id","name","status"],[1,"Bangalore","Active"],[2,"Mysore","Active"],... ]}
I'm using core PHP to fetch data from JSON with the method file_get_contents
and json_decode