How do I sort a directory by time, and display the last four image files matching a pattern with php

Posted by purpletonic on Stack Overflow See other posts from Stack Overflow or by purpletonic
Published on 2010-03-26T17:28:50Z Indexed on 2010/03/26 17:33 UTC
Read the original article Hit count: 180

Filed under:
|
|
|

I have a directory that will be getting updated frequently, I want to display the last four images files uploaded, which match a certain pattern, on my php page.

Is this possible without having to perform a sort on every single image within the directory?

Many thanks!

© Stack Overflow or respective owner

Related posts about php

Related posts about regex