So i have a foreach and i want to insert a bit of html every say 6 times or maybe 11 times the loop is run.
So my insert on each 13th record
if ($i % 13 == 0) {
}
trouble is i want to add a bit more randomness to it.
Totally forgotten what this is called as well
Something like this will make some code execute
$percentageof the time every loop. For example you could set$percent = 20then your code will execute only 20% of the time each iteration.