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

Simultaneous select/update/insert
Hi

How would I need to go about when 2 users update a single row simultaneous? And how would

How to change Time Zone
HI
I want to change the time zone of the server to another country.How can do that?

Thanks

SCO Unix
I know this might not be the place to ask, but, can anyone tell me if SCO Unix comes with PHP built

C - Reading a file into a byte array
Hi,

I'm trying to read a file into a byte array in C. I have to use C as this is for a loadru

Do While statement
hi guys,

This may sound trivial but im new to php and as part of an assignmenti have to const

mails going in spam??
The mails I sent to folks in my database using mail(function) are going in spam??

Any idea ho

Creating XML with php
I need to creat an XML with php and have successfully produced a valid output.
The problem I hav

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

Post, not working, please help
The error is:
Method Not Allowed
The requested method POST is not allowed for the URL /student

How do I create a 2D game "camera" to follow player?
In J2ME programming I'm targeting MIDP 2.0 devices.

I'm using gamecanvas and I was thinking t

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