Answers for "php sort multidimensional array by specific key string value"

PHP
9

php sort multidimensional array

function sortByAge($a, $b) {
    return $a['age'] > $b['age'];
}
$people=[
    ["age"=>54,"first_name"=>"Bob","last_name"=>"Dillion"],
    ["age"=>22,"first_name"=>"Sarah&quo
Posted by: Guest on August-06-2019

Code answers related to "php sort multidimensional array by specific key string value"

Browse Popular Code Answers by Language