azuka Posted March 26, 2006 Share Posted March 26, 2006 I have an array whose member consist of arrays. I have a problem sorting them. The problem is that for each index, the array structure may vary but it either has these keys [BookId,BookName,BookSummary,Sort] or [ChapId,ChapName,ChapText,BookId, Sort]. Since [b]Sort[/b] is common to both arrays, I want to sort by Sort in descending order. How possible is that? Link to comment https://forums.phpfreaks.com/topic/5819-sorting-a-multidimensional-array/ Share on other sites More sharing options...
ToonMariner Posted March 26, 2006 Share Posted March 26, 2006 Split them up into arrays of similar types (don't mix books nad chapters0 and then look at using array_mulit sort. Link to comment https://forums.phpfreaks.com/topic/5819-sorting-a-multidimensional-array/#findComment-20768 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.