对一维数组 二维数组内元素排序

// $data 代表需要排序的数组 可一维 可二维

usort( $data, function( $a, $b ) {

return $b['total'] - $a['total'];});

你可能感兴趣的:(对一维数组 二维数组内元素排序)