Hi, i have found the following snippet of code which i am modify make part of an image gallery script i am making, the trouble i'm having is the way it's sorting files.
At the minute the following code will just produce a list of all the files found in the directory.
the problem is the way it handles filenames with numbers in.. i.e
if i have the following files
image1.jpg
image2.jpg
image11.jpg
image19.jpg
image21.jpg
it doesn't display in that order it does it in this order
image1.jpg
image11.jpg
image19.jpg
image2.jpg
image21.jpg
does anybody have any idea how to fix this so it lists how it should? im planning on just numbering my images like that to order them and it'd be a pain if i have to take that in to account when numbering them..
thanks for any help