For example if I had something like
array(array(Engineer, texas, male, sentry gun), array(medic, germany, male, healing thing), array(heavy, russia, male, sasha), array(spy, france, male, revolver), array(sniper, australia, male, sniper rifle), array(pyro, unknown, unknown, flamethrower), array(demoman, scotland, male, grenade launcher), array(soldier, USA, male, rocket launcher), array(scout, boston, male, scatter gun))
How can I return the 9 arrays in order of what place they're from, or their weapon, etc.
I'd think with data like that of any size, you'd be using a DB, at which point it's a simple SQL query. If you are actually doing it in php, then I'd take a good hard look at [url]http://php.net/manual/en/function.sort.php[/url] - the comments have a few custom written multi-dimensional array sort functions.
Well, the content of the array changes quite often and is not the same for every person who loads the page. Otherwise I would have used a database. Any other help would be appreciated, thanks.
Thanks for your help, but your code was giving me some problems. After spending hours trying to figure out what was happening, I found a function that worked for me. Thanks for your help anyways, I appreciate it.
In case if anyone is ever looking for it, the code can be found here
[url]http://us2.php.net/manual/en/function.sort.php#76602[/url]
Real men code their own quicksorts.
Sorry, you need to Log In to post a reply to this thread.