show random images


Posted on 16th Feb 2014 07:03 pm by admin

hey guys

can someone please suggest a way in which the following code can be edited so it only picks up .jpg files, and so it only shows 20 of them which where found, in a randomized order

Did you know?Explore Trending and Topic pages for more stories like this.
Code: <?php
$files = new RecursiveDirectoryIterator("./gallery");
foreach(new RecursiveIteratorIterator($files) as $files)
{
$file = basename($files);
echo ''.$file.'<br/>';
}
?>


thanks everyone
No comments posted yet

Your Answer:

Login to answer
190 Like 39 Dislike
Previous forums Next forums
Other forums

array_combine() trouble w/csv file
I have a problem with a piece of code I wrote to import some records from a csv file into mysql. I h

Help! refer to a friend script with captcha code
Hi guys, I am posting on here in desperate need for some help with an ongoing search I have been doi

Seperate team from score
I am writing a site that does a NFL Pick 'em type application and I have a feed that gives me the sc

Links not updating
I'm trying to fuel a simple navigation system for a news section. It works fine when it comes to ret

b+ tree
Hi
can every body help me about b+ tree ?(insert & delete)

File upload issues
Hi Guys,

Can anyone see any issues with this code:
Code: [Select]$setImage= 'productimages

filesize problem
i use ubuntu 9.10 and i have mountet a folder from an windows

/mount/FOLDER
/mount/FOLDER/

help countdown timers
hello every one,

I'd like to know how to insert many countdowns in the same page.
The dura

Comparing Values
Hi
I'm reading data from a database and this seems to work OK.

Each system has an associat

Setting condidtions for an input box
Hi all,

I would like to set a condition in a txt box that says the number a user enters has t

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash