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

remove trailing slash from array
I have the following array which contains trailing slashes I need to remove. What is the best way to

How to use Substr
I want to check for the word CATEGORY: inside a string which can be CATEGORY: ITEM
and remove the

Business Health Check
Hello

I need to create an online business health check for a client it will be multiple choi

Mass activity scheduling
Hi experts,

Im facing some problems to deal with mass activity jobs.
When I run some

form problem
below in the form action, i've put "test.php?w=$sw&h=$sh" but when i input the for

PEAR Email Attachment w/ $gpg
I have no issues with this code if I take out the attachement section and include the info in the em

Quick variable question
hey guys/gals,
im trying to write a php script and it works fine as i have it, but i need to set

To add a field on the screen XK02.
Hi All,

How to add an additional field in the vendor change control screen XK02.
The

Backflush
I am looking for a report in SAP that would give me a list of all parts that are populated with a ba

small inaccuracies
I have this code to convert fractional base 10 into base 2:

while($num > 0)

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