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

Handling text changed in text box control using Ajax
I need to create a web form with a text box control. When someone types text into the textbox I nee

I need some help with the IF command...
I have a large number of images in one section of my website with the .jpg format. I'm adding a bun

Scheduler problems related to execution of a single BLT by many schedules
Hello all,

We are running several MII instances in a distibuted architecture using a sing

how to insert value
I am having file bookissueadd.php..... in which i am having tag

<td height="21&q

form variables from database help.
Hi all,

I would like to have a form that gives you options based on the results of an mysql q

generate seo frienly url from a text like wordpress
Convert: "åäö" to "aao", "space" to "-", "!?&q

insert PHP code into function
Hi,
I'm having problems when trying following:

I have:
Code: [Select]createBar("Do

PHP SUBMIT
Code: <input name="doLogin" type="image" src="images/loginsubmit.jpg

Packet Design
Hi All,
Im new about network programming and I want to design a protocol but I have some question

Search function
I am looking for some guidance from the experts.

I am trying to create a search function. It

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