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

On page view, minus credit
Hello all, please, I need a little help with this script. I am charging one credit (credits can be p

Php - mysql store data and use it later?
Hi, i' making a login page at the moment, however my username + password is stored many different pl

Material xxx does not exist in plant xxx
Dear All,

I am working for a steel project which is repetitive manufacturing.

IF STATEMENT HELP
Hi
i have created a calendar from a table:

Code: Calendar: October 2009
<table w

for loop without same $i digits?
Hi,

Can some guru please advise how can I accomplish this with a simple for loop ?

I

why aint this working?
i have this code:

Code: $num = 250;
$count = ($num - $rcount);

echo $rc

Accessing element of object array
Hello

My object looks like this:


Array ( [0] => User Object ( [id] =>

Open link with largest int string first
I have the following links i would like to open either all at once or one-by-one. How would i procee

wav to mp3 + goDaddy
I need to convert wav files to mp3s. From what I have found so far one way to do it is to have my PH

Custom Container in module pool program
Hello everyone,

I have created a custom control in my module pool screen. Now I want to s

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