Hi there. I’ve been fiddling around with the construction of an electronics-related compendium in my spare time for the last couple of weeks. I’ve never really worked with web development before, and my programming knowledge is kind of restricted to C and C++, so being introduced to at least three new languages in the past month has been quite a mouthful, but I’ve managed so far. In my endeavours I’ve stumbled onto a few problems I haven’t quite been able to solve myself or with google, however.
The one that, to me, appears the most tricky is the following:
On the homepage of my site I have three containers. These are suppose to contain some text and an image that I’m to extract from certain html files. The specific files are located in a subfolder called “/articles/”. I’m looking for a function that can fetch the filenames of the most recently, the second most recently and third most recently created files in that directory. I think I’ve figured that the function to extract the elements from the html file would be “file_get_contents(filename)”, but I’m looking for a function that can return the most recent filenames, and pass it to the file_get_contents function.
Is there any chance you guys can at least give me a hint? Or am I heading in a completely wrong direction?
Thanks in advance.