Php scandir sort by date
I'm trying to make I've tried a few solutions I found here and some other solutions from different websites, but none worked for me, so I think it's reasonable for me to post here. What I've tried so far is this:
But, this doesn't seem to work for me, it returns 3 results only, but it should return 16 results, because there are 16 images in the folder.
halfer 19.6k17 gold badges92 silver badges175 bronze badges asked Aug 12, 2012 at 15:10
answered Aug 12, 2012 at 15:50
Ryon ShermanRyon Sherman 1,4931 gold badge11 silver badges8 bronze badges 3 This is a great question and Ryon Sherman’s answer provides a solid answer, but I needed a bit more flexibility for my needs so I created this newer function: The goal is to allow having Usage is like this; just switch out
And here is the function itself:
answered May 23, 2019 at 17:46
Giacomo1968Giacomo1968 25.1k11 gold badges69 silver badges96 bronze badges Alternative example..
answered Dec 20, 2013 at 15:49
NovaYearNovaYear 1571 gold badge2 silver badges13 bronze badges Another
Toni 1,4874 gold badges13 silver badges22 bronze badges answered May 20, 2021 at 1:03
|