sort nested array in php code example
Example 1: sort multi array php
$keys = array_column($array, 'Price');
array_multisort($keys, SORT_ASC, $array);
print_r($array);
Example 2: php sort multidimensional array by value
function sortByOrder($a, $b) {
return $a['order'] - $b['order'];
}
usort($myArray, 'sortByOrder');