使用 PHP,我将如何从类似于此的 json 提要访问内部数组值,具体到此示例的每个游戏数组的值:
Array
(
[startIndex] => 3
[refreshInterval] => 60
[games] => Array
(
[0] => Array
(
[id] => 2013020004
[gs] => 5
[ts] => WEDNESDAY 10/2
[tsc] => final
[bs] => FINAL
[bsc] => final
)
[1] => Array
(
[id] => 2013020005
[gs] => 5
[ts] => WEDNESDAY 10/2
[tsc] => final
[bs] => FINAL
[bsc] =>
)
我尝试在类似于这样的 foreach 循环中嵌套一个 foreach 循环:
foreach ($json as $key => $jsons) {
foreach ($jsons as $my => $value) {
echo $value;
}
}