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

Unable to customise toolbar in FCK
Help a newbee save my job !
Hey guys i am dying here i am new to php and would like for someone to help me with this problem

Comparing MySql data and arrays.
I have a mysql table set up like this:
idsubjectbodyuseriddatetimetags1blog subjectblog body111|2

help countdown timers
hello every one,

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

Adding to an Int row in db
Hi, i have a database which houses all of the users of my site. One of the columns is for points whi

Just a white page
Okay so, my website, when I click SignUp on it it takes me to /join.php but its a complete white pag

Is there a quick way to do this?
Hi all,

I need to create a mysql table from php that goes a little something like this

Is there something wrong?
Hi all,

Just a quick question... can someone look at this code and see if something is wrong?

simple php table loop
Hi all,

I've the following code

<?php // Create category options

UPLOAD IMAGES NOT WORKING!
Hi there i have a upload script in which it uploads the picture to a folder than creates two thumbna

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