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 Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/164782-double-assosiative-array-sorting/#findComment-868938 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.