how to limit foreach loop to three loops

后端 未结 6 2327
梦如初夏
梦如初夏 2020-12-13 10:31

how to limit this loop ..just thee loops..thanks for helping



    
               


        
6条回答
  •  感情败类
    2020-12-13 11:32

    Slice the array.

    foreach(array_slice($section['Article'], 0, 3) as $article ):
    

提交回复
热议问题