Answer the question
In order to leave comments, you need to log in
How to solve a problem in php?
There is an object of 12 elements, you need to display it in groups in the layout. 3 elements per group. How to do it right?
<div class="group">
<div class="item">Элемент 1</div>
<div class="item">Элемент 2</div>
<div class="item">Элемент 3</div>
</div>
Answer the question
In order to leave comments, you need to log in
array_chunk() to break into pieces.
foreach over these parts, wrapping each in a group, and displaying the elements.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question