Skip to content
Advertisement

How to grouping data array by same value in other array in laravel php

I have some data array like this and i want to regroup this data how to do that and what i suppose to do:

JavaScript

i want grouping data by seller_id if got same seller_id,if seller_id have same data, data push in save array, something like this:

JavaScript

nedd to foreach but i dont know, what i suppose to do..? Any Ideas everyone can help me

Advertisement

Answer

Try this:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement