嘿傢伙, 我想我失去了我的想法。php:獲取數組值而不需要迭代它?
print_r($location);
列出了一些地理數據。
array (
'geoplugin_city' => 'My City',
'geoplugin_region' => 'My Region',
'geoplugin_areaCode' => '0',
'geoplugin_dmaCode' => '0',
'geoplugin_countryCode' => 'XY',
'geopl ...
當我用foreach循環遍歷它時,我可以打印每一行。 但是,不應該有可能從數組中獲取特定值嗎?
like print $location[g4];
應該打印countryCode不應該嗎?謝謝!
是,我想你可能有! – 2011-03-14 16:01:48