Garethp Posted July 4, 2009 Share Posted July 4, 2009 Ok, so I have this array $Movies, which I wasnt to sort by $Movies['MovieName']['Year'] where MovieName is a variable, and I want it to order all the Movies by Year. $Movies['MovieName'] also has other indexes attached to it like $Movies['MovieName']['Rating'] and ['Genre'], and I want those to be sorted along with the ['MovieName'] I hope I'm explaining myself properly Link to comment https://forums.phpfreaks.com/topic/164782-double-assosiative-array-sorting/ Share on other sites More sharing options...
.josh Posted July 4, 2009 Share Posted July 4, 2009 where did the data come from, a db query? better to sort it in your query than with php. If not, look into array_multisort or also if I remember correct, there's a couple of user-made multi-dim array sorts in the user posted notes of sort Link to comment https://forums.phpfreaks.com/topic/164782-double-assosiative-array-sorting/#findComment-868938 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.