This question already has an answer here:
I want to wrap every 10-groups of items in a while-loop inside a wrapper. Visualized:
echo "<ul class='wrapper'>";
while(get_field('items'))
{
echo "<li>item</li>";
}
echo "</ul>";
In this case every element would be inside this one wrapper, but I have to wrap at max ten elements and then start a new wrapper. What would be the best way to accomplish this?
</div>