I have a directory: Audio/and it will only contain mp3 files. I want to automate the process of creating links to these files. Is there any way to read the directory and add the file names in this directory to the array?
It would be doubly cool if we could make an associative array and have a key in the file name minus the .mp3 tag.
Any ideas?
To develop: I have several folders Audio/, and each folder contains mp3 files of another event. Information about the event is retrieved from the database and populated with a table. That's why I duplicate the code, because right now in each folder Audio/I need to determine the file names for the download links and determine the file names for the mp3 player.
Thank! This will greatly simplify my code, as right now I'm repeating tons of code over and over again!
source
share