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

dropdown menu
Hello everbody,

I am php newbie.
I need to develop a program that once click the drop do

help with multi-update
Now sure how to ask this really....
10g database if that matters.

I have a customer

Socket programming
Hello all,

I have a PHP socket script. GPS trackers connect to this socket. IMEI verification

Track downloads' status
Hello,

I need to make somehow, some system, to track whether downloads are completed or faile

bit of help needed
Im about to sort out my registration page for my website by customising a "registration" s

How can I uploading Transactional Data from Legacy to New SAP system
Hell Gurus,

I am overwhelmed with questions on how to migrate huge volume of Sales Orders

Class not found error
I am getting Class 'index' not found in Eval function:

//write config

$pat

adding 0 to numbers
Hey guys i need to create a 00001 number in a loop. Is there a better way of forcing a 5 digit numbe

Need help with PHP/MySQL drop down menu
I need help on how I can implement a drop down menu which queries mysql database and output the avai

Filling gaps in dates
So i'm doing a query for sales data and my return array looks like this

('date' => '20

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