{
"id": 833,
"name": "mumbai",
"state": "",
"country": "IN",
"coord": {
"lon": 47.159401,
"lat": 34.330502
}
},
{
"id": 2960,
"name": "‘kolkata",
"state": "",
"country": "IN",
"coord": {
"lon": 36.321911,
"lat": 34.940079
}
},
I want if i define $name = kolkata ; then it should show its id as 2960
using php guys please help
$name = kolkata;
$data = file_get_contents('city.json'); // put the contents of the file into a variable
$citys = json_decode($data);