I have a table with five rows for example, and my while
loop will display the five rows for me as per normal.
I‘m trying to get the loop to keep looping records until let's say $count = 12
. I want to start the counter at 0
and it will end at 12
. So, I pretty much want the loop to keep showing the same records randomly until it shows me 12 or so results and then stops.
如何在while循环中保持循环?
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
2条回答 默认 最新
- dongyuan9149 2019-07-07 20:22关注
Simple as
while ($a != 12)
$counter = 0; while ($counter != 12) { // Do stuff $counter = rand(0, 24); }
解决 无用评论 打赏 举报