PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
i have got this script which displays all folders within a folder but what i want to do now is get it to display a random picture for each of the folders that it is showing in the grid.
Create an array that contains image names and use array_rand() to select a random image. array_rand returns the key of the element that is chosen if only 1 'random' element is needed. $random_image will contain either (in this case) 0, 1, 2.