I am building up a simple PHP script to get all my site css/js files combined.
What I would like to do now is checking for the most recent built css or js file in the "cache" folder.
So... some function like:
function getLastFile('js'){
return the js file name
}
function getLastFile('css'){
return the css file name
}
I've found out solutions on the net on how to check for the last file in some folder... but how can I exactly check the last by a specific extension?