This function can be used to sort arrays which contain arrays. It does this with help of a given key. This key represents which of the inner arrays item should be used for the sorting.
/**
* Sort an array which is filled with arrays.
* The given key of the array items indicates how to sort.
* 0 stands for the first item of each array, 1 stands for the second item of each array, etc.
* @param Number arrKey The key of the array items which indicate how to sort.