Re: random selection from each subfolder
| From: | chris smith | Date: | Fri, 22 Dec 2006 06:20:54 +0000 |
| Subject: | Re: random selection from each subfolder | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-246143@lists.php.net to get a copy of this message | ||
On 12/22/06, Steven Macintyre <steven@steven.macintyre.name> wrote:
Ok ... previous problem sorted ... now onto the next ... The client wants the following; A scroll bar with 3 random thumbs from each subdirectory in the /images/ folder I was thinking ... Going into each folder, getting files, pushing into an array - shuffling array, taking first three items and combine it to a "master" array and use that ...As you get more & more images this will slow down, might take a while but it will happen eventually. Are you storing any info about images in a database (even just the name and folder they appear in) ? You could use that to your advantage.. -- Postgresql & php tutorials http://www.designmagick.com/