-4
I have a multidimensional array of type
echo "<pre>"; print_r($order_info); exit();
Array
(
[0] => Array
(
[order_product_id] => 3227
[seller_id] => 27
)
[1] => Array
(
[order_product_id] => 3249
[seller_id] => 1
)
[2] => Array
(
[order_product_id] => 3040
[seller_id] => 27
)
[3] => Array
(
[order_product_id] => 1240
[seller_id] => 1
)
I would like to arrange it ASCENDANTLY by seller_id
that is to say I wish he’d stay the way he is:
Array
(
[1] => Array
(
[order_product_id] => 3249
[seller_id] => 1
)
[3] => Array
(
[order_product_id] => 1240
[seller_id] => 1
)
[0] => Array
(
[order_product_id] => 3227
[seller_id] => 27
)
[2] => Array
(
[order_product_id] => 3040
[seller_id] => 27
)
In other words I would like to group them by seller_id (which is not another array)
what I have to do with my array $order_info
?
Sort array by a property
– Woss