Page 1 of 1

glob(), sorting by length/name

Posted: Thu Feb 21, 2013 10:38 am
by JKM
Hi there,

I've got a folder with some images, named 1,2,3,4,5,6,7...2000. Now, with glob() - for listing the images - it's listed like this:
1
10
100
1000
1001
etc.

How do I list it like this:
1
2
3
4
5
etc.

Re: glob(), sorting by length/name

Posted: Thu Feb 21, 2013 1:09 pm
by requinix
glob() followed by natsort.