I know there must be an official name to this but unfortunately I have forgotten the term. I have an integer which changes, lets say its 10. I want to divide this into however many groups as long as the result in each of the groups is 3. The leftover group if its not 3 should be 1 or 2 as I am only using whole numbers.
I also want to check this every 3 iterations but from the start so the non 3 comes at the end, so for 10
number = 3, $tag = col-md-4
number = 3, $tag = col-md-4
number = 3, $tag = col-md-4
number = 1, $tag = col-md-12
sorry if this is trivial