我有一个似乎无法从中检索信息的数组。这是一个嵌套数组吗?
print_r() 结果:
Array (
[0] => Array (
[0] => Array (
[title] => Hampton
[day] => 1st and 3rd Monday
[time] => 7:30pm
[contact] => Jan Boyd
[phone] => 0438 584 558
[email] =>
)
[1] => Array (
[title] => Frankston
[day] => 1st and 3rd Wed
[time] => 9:30am
[contact] => Vaness Ogues-Canele
[phone] => 0420 834 791
[email] =>
)
)
)
我用来尝试检索信息的代码:
foreach( $groups as $group ) { ?>
<?php echo $group['title'] ?>
<?php echo $group['day'] ?>
<?php if ($group['time']) { ?>
<?php } ?>