What is the normal procedure to sort a 3 level multidimensional array base on the 3rd level array value "count". In this array, the count number may be 1,2,3,4,5 and so on. how to carryout and have the larger count number array data set to be sorted into the beginning by the 1st level array index.
basically if an array record has a larger number in 'count' let it be in the beginning of the array in a descending order.
(if 1 record contains count 1, 2, 3, let it use the largest count number as the decision variable for the sorting)
sample multidimensional array looks like
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
)
)
usort()with a comparison function that extracts the values to compare from the 2nd level of the arguments.