php - multi deimensional array of cities -


i have multiple ids (0, 1, 2). how city name of respective id following array?

here example array:

$cities_array = array (   0 =>    array (     'city' => 'sant julià de lòria',     'region' => '06',     'country' => 'ad',     'latitude' => '42.46372',     'longitude' => '1.49129',   ),   1 =>    array (     'city' => 'pas de la casa',     'region' => '03',     'country' => 'ad',     'latitude' => '42.54277',     'longitude' => '1.73361',   ),   2 =>    array (     'city' => 'ordino',     'region' => '05',     'country' => 'ad',     'latitude' => '42.55623',     'longitude' => '1.53319',   ) ); 

you can acceed city name using

$cities_array[your_id]['city']; 

Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -