我要嵌套另一個數組裏的數組的數組循環,我的代碼將類似於此通過內部另一個陣列的PHP
array(
'type' => 'FeatureCollection',
'features' => array(
array(
'type' => 'Feature',
'geometry' => array(
'coordinates' => array(-94.34885, 39.35757),
'type' => 'Point'
), // geometry
'properties' => array(
// latitude, longitude, id etc.
) // properties
), // end of first feature
array(...), // etc.
) // features
)
當外部部分(特徵)封裝了許多其它陣列。我需要循環從已經解碼的json文件中提取的變量 - 我將如何循環訪問這些數據集? A foreach()
?
簡短的回答是:是的。 – Tadeck 2012-04-18 00:38:19
@Tadeck,很高興知道我在正確的軌道上。 :) – 2012-04-18 00:43:09