开发者

How to get an array repeat in foreach loop

This is my $settings array.开发者_开发知识库... and I would like to look this array in foreach so that I can read the $settings['node']['type'][$value['type']]['modifiers'] values in foreach loop and print them.


I'm can only guess you want to iterate over each element in your array.

foreach($settings as $node=>$types){
    foreach($types as $values=>$modifiers){
      \\ etc etc etc

         echo "Settings: $node $types $values $modifiers";

    }
}

Just keep nesting the foreach loops for each element you want to iterate.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜