arrays aka headache
| From: | Louis Grenzebach | Date: | Mon, 31 Dec 2001 13:44:01 +0000 |
| Subject: | arrays aka headache | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-79107@lists.php.net to get a copy of this message | ||
Okay so I have a multidimensional associative array, $userlist[$file][$stat], $stat only contains
one value, I want to sort $userlist[$file] based off some associative element in $stat, say like
'wins'. array_multisort isn't appropriate as far as I can tell since $stat isn't
an array, it's just a value, like, $userlist[$files]['wins']=4. An exampleof the data
would be as follows:
$userlist['000001']['wins']=4
$userlist['000002']['wins']=9
$userlist['000003']['wins']=2
I'd like, after running whatever command/function, to have the list be sorted as follows-
$userlist['000002']['wins']=9
$userlist['000001']['wins']=4
$userlist['000003']['wins']=2
I'm sure it's possible, I'm just clueless as to HOW to go about it. Any help much
appreciated.
Regards
Louis Grenzebach