配列を別の配列内にネストしたいのですが、私のコードは次のようになります
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()
?_