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]); 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. 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 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() 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
Archived
This topic is now archived and is closed to further replies.