php: get array value without iterating through it?
问题 hey guys, i think i lost my mind. print_r($location); lists some geodata. array ( 'geoplugin_city' => 'My City', 'geoplugin_region' => 'My Region', 'geoplugin_areaCode' => '0', 'geoplugin_dmaCode' => '0', 'geoplugin_countryCode' => 'XY', 'geopl ... when I iterate through it with a foreach loop I can print each line. However shouldn't it be possible to just get a specific value out of the array? like print $location[g4]; should print the countryCode shouldn't it? Thank you! 回答1: echo $location