Hey guys! Could you help me with a problem I`ve been having lately.
I`m building website with an image gallery in it. Images for the gallery are grouped in different folders on a server. There are folders with images and thumbs folders inside those for thumbnails. Thumbnail names are exactly the same as original image names. What I want to do is to make a loop that will extract filenames from the specified folder and put them as a link on thumbnail. So in the end result I would get all the thumbnails displayed on the page and when I click on them it would open the original image.
Is it possible to do with php? Im really quite new to php and dont know much things yet.
They are just subfolders (gallery1, gallery2, gallery3) of the folder called “gallery”.
Thanks everybody for the answers. Will try to write the function. It will be then my first in real world applicable function I have written myself in php
No, i don`t think I have. The files are just copied to the ftp folders. Do the files need to be stored in the database in order for php to get to them?
Do feel free to post your work-in-progress here, if you get stuck or would like to perhaps find “better” (or just different) ways to do the same thing.