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

displaying email without attracting a ton of spam
Hello,

this is maybe the wrong place to ask.
How would you display an email address on a w

Saving PHP output as a file
I wondered if anyone knows how to save the rendered output of a PHP script as a file?

I have

[Need Help] php timing issues
I don't know what is going wrong. I need some help with being able to set an image at 9:00am Colorad

Is there a way to override built in php functions without APD?
I am trying to use the
rename_function()
override_function()
options that are built into

styling a RadioButtonList
HiI need to have a radio button and close to it, its lable, then a space then another set of those.

generating random codes
Hi guys n gals,

I have a requirement to generate 250,000 unique codes...

These codes a

error reporting
hey everyone

I have a production server in which I want error reporting but only on some page

PHP/Database issue
My friend is helping me make a database where you go to a certain webpage of my site and the page wi

Load Animated Image while cache is serve
I have a page that loads up using cache and took about 1 to 2 minutes before it loads to the page. <

A little help needed passing hidden values to next page
I have a page that has hidden values in a form.

example
Code: <input name='signupID

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