A
A
Anton2018-03-19 14:49:06
PHP
Anton, 2018-03-19 14:49:06

How to rebuild this array?

Good afternoon.
There is an array of objects. In the layout, the rows are separated by row-blocks, 2 or 3 elements each, depending on whether one of the objects has the "large block" parameter set.
As an option - to correct the layout, yes, but there is no desire to dig it up.
How to rebuild the array in such a way that the main keys are the same rows, and the elements inside them are objects, of course, given that there may be an object with a large block
5aafa3af21ca7945035203.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2018-03-19
@webinar

This is usually done in js: https://masonry.desandro.com/
But if you are not looking for easy ways, you can rebuild the array, but where is the example of the array?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question