根据 3 级数组值“count”对 3 级多维数组进行排序的正常过程是什么。在这个数组中,计数可能是 1,2,3,4,5 等等。如何执行将较大计数的数组数据集按一级数组索引排序到开头。
基本上,如果数组记录在“计数”中具有较大的数字,则使其按降序排列在数组的开头。
(如果 1 条记录包含计数 1、2、3,让它使用最大的计数作为排序的决策变量)
示例多维数组看起来像
Array
(
[174] => Array
(
[28] => Array
(
[index] => 28
[draw] => 1
[date] => 12-05-2036
[value_a_key] => 7
[value_b_key] => 2
[value_c_key] => 4
[value_a] => 1
[value_b] => 5
[value_c] => 12
[count] => 1
)
)
[175] => Array
(
[19] => Array
(
[index] => 19
[draw] => 10
[date] => 12-05-2027
[value_a_key] => 2
[value_b_key] => 4
[value_c_key] => 3
[value_a] => 1
[value_b] => 5
[value_c] => 13
[count] => 1
)
[26] => Array
(
[index] => 26
[draw] => 3
[date] => 12-05-2034
[value_a_key] => 5
[value_b_key] => 4
[value_c_key] => 2
[value_a] => 1
[value_b] => 5
[value_c] => 13
[count] => 2
)
[28] => Array
(
[index] => 28
[draw] => 1
[date] => 12-05-2036
[value_a_key] => 7
[value_b_key] => 2
[value_c_key] => 5
[value_a] => 1
[value_b] => 5
[value_c] => 13
[count] => 3
)
)
[178] => Array
(
[19] => Array
(
[index] => 19
[draw] => 10
[date] => 12-05-2027
[value_a_key] => 2
[value_b_key] => 4
[value_c_key] => 7
[value_a] => 1
[value_b] => 5
[value_c] => 16
[count] => 1
)
)