I know how to sort an array by comparing each of the values in the array and then sorting them according to less than, greater than or equal to each other. However, given the case where I had an array of arrays (an n-dimensional array). How would I sort? Take this example:
Quote:
array(array( 'lastName' => 'ab', 'firstName' => 'cd'
), array( 'lastName' => 'ef', 'firstName' => 'gh'
), array() ....)
|
How would I sort it according to the lastName and then maintaining that order sort it according to the firstName? Can anybody point me to some references to this or tell me what this type of sorting is called? I'm not sure what to even type into Google.