我想将一个数组嵌套在另一个数组中,我的代码将与此类似
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 文件中提取的变量——我将如何遍历这些数据集?一个foreach()
?