skip current iteration

前端 未结 4 1195
醉话见心
醉话见心 2020-12-28 11:44

I have a php array $numbers = array(1,2,3,4,5,6,7,8,9)

if I am looping over it using a foreach foreach($numbers as $number)

and hav

4条回答
  •  佛祖请我去吃肉
    2020-12-28 12:18

    continue;
    

    Continue will tell it to skip the current iteration block, but continue on with the rest of the loop. Works in all scenerios (for, while, etc.)

提交回复
热议问题