We all know the basic
$i = 1;
while ($i<100){
echo $i;
$i++
}
Question: How do I increment $i by a random number between 1 and 5 each time it loops?
We all know the basic
$i = 1;
while ($i<100){
echo $i;
$i++
}
Question: How do I increment $i by a random number between 1 and 5 each time it loops?
Exactly like you described it in words: By increment it with a random number between 1 and 5.
while ($i < 1000) {
echo $i;
$i += rand(1,5);
}