Hi, I have a folder of images on my server and each day I want a new image to be picked and displayed from this folder. What would be the best way of doing this ? Thanks.
Do you want a specific image related to the current day or a random image? How many images are in the folder? How often is this folder updated?
hello, I want a random image, picked everyday. There will be many images in the folder and new ones being updated. I cant say when the folder is updated, sometimes twice a day sometimes once a month.
Get the directory contents using opendir() and readdir() and store the filenames in an array. Then use the count() function to see how many are there and then the rand() function to pick a random one. Regards,