franzwarning Posted July 8, 2011 Share Posted July 8, 2011 How would I go about randomly selecting the last two photos (jpgs) in a folder and echoing the url? Cheers, George Link to comment https://forums.phpfreaks.com/topic/241388-randomly-select-the-last-two-images-in-a-folder/ Share on other sites More sharing options...
msaz87 Posted July 8, 2011 Share Posted July 8, 2011 Check out readdir. You can use that and opendir to store them all in an array and pull them out however you'd like. Link to comment https://forums.phpfreaks.com/topic/241388-randomly-select-the-last-two-images-in-a-folder/#findComment-1239960 Share on other sites More sharing options...
franzwarning Posted July 8, 2011 Author Share Posted July 8, 2011 Thanks! Figured it out. Link to comment https://forums.phpfreaks.com/topic/241388-randomly-select-the-last-two-images-in-a-folder/#findComment-1239962 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.