Welcome to WebmasterWorld Guest from 22.214.171.124
Does anyone know if this can be done. I think I can probably get it done, by having one routine just reading all the folders in the directory, and then one routine reading all the files, but I was wondering if there was an easier way, or a smarter way :)
Thanks for any help thrown my way.
It depends on which platform you're using and how directories are designated. On *nix, there is a "d" in the attributes column that can be used to seperate directories from files. On Windows, these are designated by "<DIR>".
Seperate your values into two arrays, directories and files. Then you can create a function and use usort() to sort them.