Displaying images in folder from new to old

时间:2015-07-29 00:13:55

标签: php image

I am currently building a site, and one of its function is to display images inside a folder. Apparently the image seems to be displaying in random, and I would like to display them according to the date last added into the folder. This is my current code:

 Hello

I understand in order to sort the images, I need to add the time added in an array, and then sort that array, however I am not even able to figure the time last added. With filemtime() and fileatime(), I kept on displaying the creation and the last added time of the FOLDER, instead of the IMAGES inside the folder.

I have been searching for the solution for almost 2 days now, either on here or on php.net, and I still don't seem to find the correct solution to my problem. Any kind person can help saving my poor soul would be very much appreciated.

Ray

0 个答案:

没有答案
相关问题