1.对键名排序(key):
ksort() 键值升序排序
krsort() 键值降序排序
sort() 键值升序 键值关系不保持
rsort() 键值降序 键值关系不保持
2.键值排序(value)
asort() 升序排序
arsort() 降序排序