PHP loop X amount of times

后端 未结 8 1252
有刺的猬
有刺的猬 2020-12-17 17:55

I have a string called $columns which dynamically gets a value from 1 to 7. I want to create a loop of for however many times

8条回答
  •  伪装坚强ぢ
    2020-12-17 18:36

    If you just need to use number of repeat count:

    for ($i = 0; $i < 5; $i++){
        // code to repeat here
    }
    

提交回复
热议问题