我在PHP中有一个数组,看起来像这样:订购PHP数组基于内容
Array
(
[2] => post4.post
[3] => post7.post
[4] => post5.post
[5] => post3.post
[6] => post6.post
[7] => post1.post
[8] => post2.post
)
我怎么能安排它,所以它看起来是这样的?
Array
(
[0] => post7.post
[1] => post6.post
[2] => post5.post
[3] => post4.post
[4] => post3.post
[5] => post2.post
[6] => post1.post
)
该数组有一个包含在文件夹中的文件的列表。在我的本地服务器看起来像第二个例子,但在标准服务器上看起来像第一个例子。
在此先感谢:d
谢谢!这工作完美无瑕! – pmerino