Note about "morgan at anomalyinc dot com"'s comment:
As of PHP4, you can just use array_multisort() to sort parallel or multi-dimensional arrays.
![]() | arsort说明bool arsort ( array &array [, int sort_flags] )本函数对数组进行排序,数组的索引保持和单元的关联。主要用于对那些单元顺序很重要的结合数组进行排序。 如果成功则返回 TRUE,失败则返回 FALSE。 fruits 被按照字母顺序逆向排序,并且单元的索引关系不变。 可以用可选的参数 sort_flags 改变排序的行为,详情见 sort()。 ![]()
Scott Woods
03-Feb-2005 12:21
Note about "morgan at anomalyinc dot com"'s comment:
rodders_plonker at yahoo dot com
22-Aug-2000 09:43
I was having trouble with the arsort() function on an older version of PHP which was returning an error along the lines of 'wrong perameter count for function arsort' when I tried to use a flag for numeric sorting (2/SORT_NUMERIC).
morgan at anomalyinc dot com
25-Nov-1999 11:30
If you need to sort a multi-demension array, for example, an array such as
| ![]() | |