how to limit foreach loop to three loops

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

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



    
               


        
6条回答
  •  甜味超标
    2020-12-13 11:23

    A foreach loop wouldn't be the best if you need to limit it. Try using a for loop.

    
                        
                            
                            link('View', '/articles/view/'.$article['id']);}?>
                        
                        
    

    This code will make the text loop 3 times.

提交回复
热议问题