我想從位置關鍵字獲取ahmedabad,surat。我給出了一個輸出如何從JSON數組響應中檢索值
$jsonResponse = Zend_JSON::decode(substr($response['body'], 9));
print_r($jsonResponse['result']);
//output :Array ([0] => Array ([location] => ahmedabad [id] => 18x49) [1] => Array ([location] => Surat [id] => 18x42))
我去了很多網站上的解決方案,但不知道如何做到這一點。請給我一些幫助。我希望我已經提供了重要的細節。
瞭解數組:http://www.php.net/manual/en/language.types.array.php –