菜单切换
FACESOHO知行者
心灵
记录
远方
赞赏工具
源代码
运行
保存
"; natsort($temp_files); echo "Natural order: "; print_r($temp_files); ?>
运行结果
Standard sorting: Array ( [0] => temp1.txt [1] => temp10.txt [2] => temp15.txt [3] => temp2.txt [4] => temp22.txt )
Natural order: Array ( [0] => temp1.txt [3] => temp2.txt [1] => temp10.txt [2] => temp15.txt [4] => temp22.txt )