...

View Full Version : Php Multidimentional array sort



ajvpot
02-06-2010, 02:19 AM
Ok, here we go...
I need to add a parameter to an array (see code at bottom) and then sort by it.
The new parameter would be MemberClicks + MemberKeys. It would then need to sort the keys in the array.

[ARRAY]


Array
(
[0] => Array
(
[MemberName] => munktube1
[MemberUserID] => 290672
[MemberKeys] => 6998
[MemberClicks] => 1174
[MemberManager] => Yes
[MemberCountry] => Unknown
)

[1] => Array
(
[MemberName] => ajvpot
[MemberUserID] => 290674
[MemberKeys] => 13383
[MemberClicks] => 8150
[MemberManager] => Yes
[MemberCountry] => United States
)

[2] => Array
(
[MemberName] => wwefan661
[MemberUserID] => 290974
[MemberKeys] => 14751
[MemberClicks] => 7251
[MemberManager] => No
[MemberCountry] => Unknown
)

[3] => Array
(
[MemberName] => willmaster
[MemberUserID] => 290668
[MemberKeys] => 21102
[MemberClicks] => 13302
[MemberManager] => No
[MemberCountry] => Canada
)

)
[WHAT I WANT]


Array
(
[0] => Array
(
[TeamScore] => 8172
[MemberName] => munktube1
[MemberUserID] => 290672
[MemberKeys] => 6998
[MemberClicks] => 1174
[MemberManager] => Yes
[MemberCountry] => Unknown
)

[1] => Array...

)
Thanks for help



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum