the way i did this was by structuting the array like this $array['href'][0] = 'www.com.com'; $array['description'][0] = 'blah!'; etc...
then use the array_multisort function like this To sort by "href": array_multisort($array['href'],$array['description'],$array['time']); a key point is that the first element in array_multisort is what the others are sorted by. You can also use flags to get the type of reorder you want. if you're getting the data from a database, try sorting in the query, it'll make your life a lot easier. anyway, hope that helps, -- -------------------------------------------------------------->> Jasper Howard :: Database Administration ApexEleven Web Design 1.530.559.0107 http://www.ApexEleven.com/ <<-------------------------------------------------------------- "Chris Lott" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have an array $links like this: > > [1] => Array > ( > [href] => http://www.poetrymagazine.org/epstein_sept_prose.html > [description] => Thank You, No > [time] => 2004-09-17T17:30:32Z > ) > > [2] => Array > ( > [href] => http://110am.com/projects/manuscript/ > [description] => Manuscript > [time] => 2004-09-16T19:25:14Z > ) > > I'd like to sort the array based on one of the values in the field > href, description, or time. Is there a canonical way of doing this? > > c > -- > Chris Lott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php