$students = array (
256 => array ( name => Jon , grade => 98.5),
2 => array ( name => Vance , grade => 85.1),
9 => array ( name => Stephen , grade => 94.0),
364 => array ( name => Steve , grade => 85.1),
68 => array ( name => Rob , grade => 74.6)
);
function grade_sort($x,$y){
return ($x[ grade ] < $y[ grade ]);
}
uasort ($students, grade_sort );
i 是新学习者,即能很好地理解上述准则。 可修改<代码>(x[职等]及以下;y[职等]);至return$x <$y;
如果没有,为什么? 感谢