如果$num随机数为6那么只再置一次筛子用do...while怎么实现,谢谢
<?php
//$time是循环次数,初始化为0
$time=0;
do{
$num=rand(1,6);
$time++;
}while($num==6);
echo $time;
?>