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 Quote 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. Quote 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. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.