Hello

My array $files contains a list of name files like this

1.txt
2.txt
3.txt
...
10000.txt


If I sort the array sort($files) I receive this for example

8809.txt
881.txt
8822.txt

but I would have this instead ..!

881.txt
8809.txt
8822.txt

How to solve ?

Thanks