Printable View
hi folks, i am using glob("Data/small/*.jpg") to get a list of images in a folder and store in an array. it gives me a list as follows: Data/small/02.jpg Data/small/03.jpg Data/small/04.jpg Data/small/05.jpg Data/small/06.jpg Data/small/07.jpg Data/small/08.jpg Data/small/09.jpg Data/small/1.jpg Data/small/10.jpg Data/small/11.jpg Data/small/12.jpg what i want is to sort the array numerically i.e. 1.jpg should come on top. i have trid sort() as well as asort() functions with different flags but no encouraging results :(
Try the natsort() function.
thanx alot. i will try it....