php-dimensional array or multidimensional array sort method

ThinkPHP 5.1.39 grouping and query a statistical method is as follows

 

 

FIG array obtained as follows:

 

php sort of basis functions:

  • sort () - array in ascending order
  • rsort () - array in descending order
  • asort () - The value associated array, the array is in ascending order, holding key value
  • ksort () - The bond associative array, the array is in ascending order, holding key value
  • arsort () - The value associated array, the array in descending order, holding key value
  • krsort () - The bond associative array, the array in descending order, holding key value
  • array_multisort () - a multi-dimensional array sort,

 

 

 The sum value of the descending order as follows:

 

 The results are as follows:

 

Guess you like

Origin www.cnblogs.com/pineconeguo/p/12607503.html
Recommended