php sort array by child value

33

// PHP 7+
usort($arr, function ($a, $b) {
        return $a['key'] <=> $b['key'];
    });

Comments

Submit
0 Comments