Код: Выделить всё
[
(object) ['item1' => 'foo 0', 'item2' => 'bar 0', 'catid' => 3],
(object) ['item1' => 'foo 1', 'item2' => 'bar 1', 'catid' => 7],
(object) ['item1' => 'foo 2', 'item2' => 'bar 2', 'catid' => 10],
(object) ['item1' => 'foo 3', 'item2' => 'bar 3', 'catid' => 7],
]
Подробнее здесь: https://stackoverflow.com/questions/376 ... each-group
Мобильная версия