PHP: Loop Through Multidimensional Array

后端 未结 1 626
终归单人心
终归单人心 2021-01-14 03:54

I need to be able to loop over only a section at a time to populate content for some Tabs. What would be the best way to loop over just the Videos array?

<
相关标签:
1条回答
  • 2021-01-14 04:28
    <?php
    $result = array(...);
    
    foreach( $result['videos'] as $video )
    {
      // $video is each individual item in the videos array
    }
    
    0 讨论(0)
提交回复
热议问题