Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是我的 $settings 数组...。我想在 foreach 中查看这个数组,以便我可以读取$settings['node']['type'][$value['type']]['modifiers']foreach 循环中的值并打印它们。
$settings['node']['type'][$value['type']]['modifiers']
我只能猜测您想遍历数组中的每个元素。
foreach($settings as $node=>$types){ foreach($types as $values=>$modifiers){ \\ etc etc etc echo "Settings: $node $types $values $modifiers"; } }
foreach只需为要迭代的每个元素继续嵌套循环即可。
foreach