PHP uses Asort () to sort the associative array by value, Asort the array
This example describes how PHP sorts associative arrays by value by Asort (). Share to everyone for your reference. The specific analysis is as follows:
PHP uses Asort () to sort the associative array by value, and the sort difference is that the sort is assigned a new key name to the cells in the array. The original key name is deleted.
$nums = Array ("One" =>5, "=>2", "three" =>1), Asort ($nums); foreach ($nums as $key = = $val) {print "$key = $ Val
";}
I hope this article is helpful to everyone's PHP programming.
http://www.bkjia.com/PHPjc/969490.html www.bkjia.com true http://www.bkjia.com/PHPjc/969490.html techarticle PHP uses Asort () to sort the associative array by value, Asort An array This example describes how PHP sorts the associative array by value by Asort (). Share to everyone for your reference. ...