Sorting a multidimensional array
Posted: Mon Feb 09, 2009 2:34 pm
Hi
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 Sort is common to both arrays, I want to sort by Sort in descending order. How possible is that?
Thanks
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 Sort is common to both arrays, I want to sort by Sort in descending order. How possible is that?
Thanks