Is their a way in a while loop to assign a variable to a class in a div, for every third item in a while loop. I am using the blueprint structure and the third div is at the
If the intention is to do something every X item use modulo. modulo is the remainder of the division and becomes zero if the division is exact an integer.
if(!($counter%3)) {
// this is 3 6 9 etc.
}
$counter++;