PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php $arr = [ ["name" => "name1", "score" => 1], ["name" => "name2", "score" => 7], ["name" => "name3", "score" => 4], ["name" => "name4", "score" => 3], ["name" => "name5", "score" => 10] ]; $res = usort($arr, fn($a, $b)=>$a['score']<=>$b['score']); print_r($arr);
Show:  
Copy Clear