Answer the question
In order to leave comments, you need to log in
How to reset an array key?
Here is an array sorted by the natsort function, the values are sorted in natural order.
[0]=> string(8) "file_1"
[1111]=> string(8) "file_2"
[2222]=> string(8) "file_3"
[3333]=> string(8) "file_4"
[4444]=> string(8) "file_5"
[5554]=> string(8) "file_6"
[6665]=> string(8) "file_7"
[7776]=> string(8) "file_8"
[8887]=> string(8) "file_9"
[1]=> string(9) "file_10"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question