>>The first question to ask is: what is a sorted 2d array for you?
do you want to sort the "rows" based on values(keys) in one or more columns? do you want to sort the "columns" based on values(keys) in one or more rows? do you want each row to have its columns sorted? do you want each column to have itsrows sorted? do you want the entire 2d array sorted as calender dates? (i.e. as if all rows were concatinated in order then having columns sorted, then uncatinated).
These are but 5 differentorders forsorting a 2D array. (there areother sort orders too)