updated - Sorting array data (PHP) - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Skype & Technology (/forumdisplay.php?fid=9) +---- Forum: Tech Talk (/forumdisplay.php?fid=17) +----- Thread: updated - Sorting array data (PHP) (/showthread.php?tid=80839) updated - Sorting array data (PHP) by lordy on 01-10-2008 at 09:48 AM
hey kiddies code: How can I get it to sort by a specific key, for example the first artist key, alphabetically so it ends up like this: code: I hope that is clear enough lol i hope it's possible btw its in PHP RE: updated - Sorting array data (PHP) by markee on 01-10-2008 at 10:50 AM
Have a look at some of these examples, you should be able to work out how to use it how you want. RE: updated - Sorting array data (PHP) by lordy on 01-10-2008 at 09:40 PM I had a look at that and from what i understand of what it does, it actually doesn't so what i want it to, if i undersatnd it correctly that functino will only sort within on branch of the array (ie. if i have multiple [artist] thingies on one particular branch then it will sort within those artists) but it will not rearrange the entire array, which is what i need it to do lol RE: updated - Sorting array data (PHP) by WDZ on 01-11-2008 at 12:03 AM
array_multisort() should work fine for that. Here's an example of how you could use it... code: RE: updated - Sorting array data (PHP) by Adeptus on 01-11-2008 at 04:23 AM You should also keep in mind that if the data is coming from a database, you can easily tell the database to return it presorted... |