Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
46 lines (46 loc) · 1.67 KB

File metadata and controls

46 lines (46 loc) · 1.67 KB
Copy raw file
Download raw file
Edit and raw actions

对数组进行排序

  • 排序相关函数
- https://www.php.net/manual/zh/array.sorting.php
函数名称 排序依据 数组索引键保持 排序的顺序 相关函数
array_multisort() string 键保持不变,int 键重新索引 第一个数组或者由选项指定 array_walk()
asort() 升序 arsort()
arsort() 降序 asort()
krsort() 降序 ksort()
ksort() 升序 krsort()
natcasesort() 自然排序,大小写不敏感 natsort()
natsort() 自然排序 natcasesort()
rsort() 降序 sort()
shuffle() 随机 array_rand()
sort() 升序 rsort()
uasort()由用户定义 uksort()
uksort() 由用户定义 uasort()
usort() 由用户定义 uasort()
Morty Proxy This is a proxified and sanitized view of the page, visit original site.