millercj Posted March 10, 2009 Share Posted March 10, 2009 Is there a way to sort a multi-dimensional array but a dimension other than the first? for example( I know this wont work): sort($array[][5]); Quote Link to comment https://forums.phpfreaks.com/topic/148690-sort-md-array-by-5th-dimension/ Share on other sites More sharing options...
premiso Posted March 10, 2009 Share Posted March 10, 2009 usort Would be one way. Other than that it would have to be a custom function. Quote Link to comment https://forums.phpfreaks.com/topic/148690-sort-md-array-by-5th-dimension/#findComment-780777 Share on other sites More sharing options...
millercj Posted March 10, 2009 Author Share Posted March 10, 2009 Ok i've been looking at Usort and some other ones oh the php.net site for a while and it just doesn't make sense to me. Can someone give me an example and explain how it works Quote Link to comment https://forums.phpfreaks.com/topic/148690-sort-md-array-by-5th-dimension/#findComment-781084 Share on other sites More sharing options...
Mark Baker Posted March 10, 2009 Share Posted March 10, 2009 array_multisort() Quote Link to comment https://forums.phpfreaks.com/topic/148690-sort-md-array-by-5th-dimension/#findComment-781132 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.