谁能告诉我如何对包含以数字开头的文件名的数组进行排序?因为以11,12,13等开头的字符串被认为低于2,所以我的结果如下:
[0] "1. File one.pdf" [1] "11. File eleven.pdf" [2] "12. File twelve.pdf" [3] "2. File two.pdf" [4] "3. File three.pdf"
有什么我可以做的正确分类吗?
php arrays sorting string numbers
arrays ×1
numbers ×1
php ×1
sorting ×1
string ×1