Skip to content
Advertisement

Tag: filemtime

Sort files with filemtime

I have PHP file that generates gallery from a directory of images. I want to sort images by modification date. I’m trying to use filemtime function then sort function using the following code: And the output is like this: It is not sorted by modification date. How can I make my code work? Answer

Advertisement