I have a .js file that contains a list of image files for use in a slideshow. I need to dynamically populate the list in the .js file using PHP to pull data from my mySQL database.
For example, the database record has a field called 'order' and 'imagepath'. In this field is a list of image filenames in the order I want them to display in the list: "[url removed, login to view], [url removed, login to view], [url removed, login to view]" just like that. I need the PHP to recognize the individual file names and then print them in that order (using the DB field 'imagepath' for the full path to the folder).
I can pass the record's ID through the URL so the php knows what record to lookup.
Attached is the .js file I need to change with the DB data. You can see the list of images at the top in the order they are displayed on screen. I want this list to be dynamically generated using the filenames from the DB.