What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » updated - Sorting array data (PHP)

updated - Sorting array data (PHP)
Author: Message:
lordy
Senior Member
****


Posts: 853
Reputation: 24
34 / Male / Flag
Joined: Jul 2004
Status: Away
O.P. updated - Sorting array data (PHP)
hey kiddies

what I'm looking to do is this:

say i have a multidimensional array like so:

code:
[0] => {
  ['name'] => "Baby, Please Don't Go"
  ['artist'] => {
                [0]=> "AC/DC"
                }
}
[1] => {
  ['name'] => "Tequila"
  ['artist'] => {
                [0] => "A.L.T. and The Lost Civilization"
                }
}
[2] => {
  ['name'] => "Show You Love Me"
  ['artist'] => {
                [0] => "A.K. Soul"
                [1] => "Jocelyn Brown"
                }
}
[3] => {
  ['name'] => "Dog Eat Dog"
  ['artist'] => {
                [0] => "AC/DC"
                }
}


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:
[0] => {
  ['name'] => "Baby, Please Don't Go"
  ['artist'] => {
                [0]=> "AC/DC"
                }
}
[1] => {
  ['name'] => "Dog Eat Dog"
  ['artist'] => {
                [0] => "AC/DC"
                }
}
[2] => {
  ['name'] => "Show You Love Me"
  ['artist'] => {
                [0] => "A.K. Soul"
                [1] => "Jocelyn Brown"
                }
}
[3] => {
  ['name'] => "Tequila"
  ['artist'] => {
                [0] => "A.L.T. and The Lost Civilization"
                }
}


I hope that is clear enough lol i hope it's possible

btw its in PHP :)

This post was edited on 01-10-2008 at 09:56 AM by lordy.
01-10-2008 09:48 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
updated - Sorting array data (PHP) - by lordy on 01-10-2008 at 09:48 AM
RE: updated - Sorting array data (PHP) - by markee on 01-10-2008 at 10:50 AM
RE: updated - Sorting array data (PHP) - by lordy on 01-10-2008 at 09:40 PM
RE: updated - Sorting array data (PHP) - by WDZ on 01-11-2008 at 12:03 AM
RE: updated - Sorting array data (PHP) - by Adeptus on 01-11-2008 at 04:23 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On