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

SWF image using php?
Hello once again.

My latest en devour requires me to produce an image of a static .swf that i

Help a newbee save my job !
Hey guys i am dying here i am new to php and would like for someone to help me with this problem

Preg_match question
I want to use preg_match to make sure a string is always 6 characters long and only contains 0-9 and

array ...
hi
Code: function formatCategories($categories, $parentId)
{
// $navCat stores all child

PEAR Email Attachment w/ $gpg
I have no issues with this code if I take out the attachement section and include the info in the em

present value of sequence?
Hi

Please help me to find out the present value of sequence?

Thanks

Multiple upload and Resize
I would like some help on my script I have the for my index.php

////

<html&

Problem with HTTP Caching...?
Hi there, im trying to implement caching. But it doesn't always work.
I post it here because ther

Hom to make one url to open together with another url
I have a chat, which i want to be opened, as soon as the users login to the site. As it is now, when

Facebook status update API
Hello,

So, I'm trying to create my first Facebook application with PHP.

Basic ideas fo

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