Well, you said "arrayID, clientID, total, and I wish to sort by total", so I assumed your array had associative indexes ("arrayID, clientID, total"). If not, then you'll need to substitute the appropriate numeric index in the code where I put 'total'. If the index for what was heretofore called "total" is 2, then use 2. The code I posted was meant to demonstrate multi-dimensional array sorting, not as drop-in code.