php通过asort()给关联数组按照值排序,和sort的区别是,sort是按照
$nums = array("one"=>5,"two"=>2,"three"=>1); asort( $nums ); foreach ( $nums as $key => $val ) { print "$key = $val<br />"; }
php通过asort()给关联数组按照值排序,和sort的区别是,sort是按照
$nums = array("one"=>5,"two"=>2,"three"=>1); asort( $nums ); foreach ( $nums as $key => $val ) { print "$key = $val<br />"; }