PHP:按编号排序数组

How to sort the array by last number? String:

152908----abcd----5
152918----abcd----4
152938----abcd----1
152970----abcd----3
152972----abcd----2

Make them like this:

152938----abcd----1
152972----abcd----2
152970----abcd----3
152918----abcd----4
152908----abcd----5

Take a look at usort. You can give it an array and a custom compare function.