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

Giving the below syntax error
Dear Experts,

I have used 2 buttons in gui status as display and cjhange.When the user wi

Sending UDP Raw socket
I truly need help on this. I am trying to write a test program that simulate a network environment

There was a problem with the request. (Code: 0)
Any Idea what could cause this? I get it randomly at best. But with both IE and FF. It derives from

Querying info from one table based on info in another
Hi, I am currently trying to make a part for my user driven website where one user can subscribe to

$variable = $variable
Hello

Sorry if this is a really simple question but I have run out of ideas. Is there a reall

add to sql result
ok see rite now my sites hit counter is counted from the mysql visitor log i need to clear it aft

ldap connection
We are using ldap to get user information from the domain controller. It was working before. Recentl

PHP and MySQL Question/Help
I have a MySQL db with all my servers and all their details like server name, IP, OS, RAM etc etc 26

Guixt issue
Hello all,

We are experiencing the following problem with Guixt:

Some transact

Gantt Chart Tool
Does anyone know of a good free gantt chart creator tool

Thanks

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