<?php
$questionsets = array(
"A" => array("category" => "Some Category A", "score" => 0),
"B" => array("category" => "Some Category B", "score" => 29),
"C" => array("category" => "Some Category C", "score" => 12),
"D" => array("category" => "Some Category D", "score" => 88),
"E" => array("category" => "Some Category E", "score" => 4),
"F" => array("category" => "Some Category F", "score" => 22),
"G" => array("category" => "Some Category G", "score" => 20),
"H" => array("category" => "Some Category H", "score" => 40),
"I" => array("category" => "Some Category I", "score" => 42)
);
usort($questionsets,function($a,$b){return $b['score']-$a['score'];});
print_r($questionsets);
preferences:
122.42 ms | 405 KiB | 5 Q