Answers for "php sort multidimensional associative array by key"

PHP
1

php sort multidimensional array by value

function sortByOrder($a, $b) {
    return $a['order'] - $b['order'];
}

usort($myArray, 'sortByOrder');
Posted by: Guest on October-15-2020

Code answers related to "php sort multidimensional associative array by key"

Browse Popular Code Answers by Language