This are my array
$items = array( "100"=>
array(
'id' => 15,
'category' => array('id'=>'100010'),
'description' => array('type'=>'Drink'),
),
"101"=>
array(
'id' => 13,
'category' => array('id'=>'100055'),
'description' => array('type'=>'Fruit'),
),
"102"=>
array(
'id' => 21,
'category' => array('id'=>'100002'),
'description' => array('type'=>'Vege'),
)
);
$soryBy = array(array('id'=>'100055'),array('id'=>'100002'),array('id'=>'100010'));
What are the approach to sort the $items
category
according to $soryBy
? Is there any existing php function i can use??
Thanks