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

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 help
Hello i got this code to fetch data from database but it is not working it displays
7
Array

Preloading images
Posting this question here because I am not sure where this should belong.I am building an asp.net a

Print out contents of to Excel
I have got this script that gathers all the data that I need but I need it to send it to excel inste

no idea what to do...
I'm fed up. I had issues with code that I have working on a different site that didn't work on my cu

problem getting my contact form working
Yeah I know this is a pretty basic problem, but it's been a while since I've worked with PHP and I'm

Log $_POST
How would i log submits on a form, by everyone? I want to then echo the number of submissions.

php call servlet
I have done a php backup application .
So there is a form that user pick some files to zip and d

captcha error
I have been trying to implement a captcha in php...

here is the code..
Code: (php) [Select

When i am Canseling the Billing Document in VF11 I am getting Shortdump
Hi Experts

When i am Canseling the Billing Document in VF11 I am getting Shortdump.

Help? Need help on project with templates involving mysql and php.
I'm having a hard time explaining what I want but basically here is what I have in place:

-Da

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