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

Login Issue's
Code: <?php
$file = fopen('user.txt', 'r');

/* Set login to false initially */

Map.php
I am a complete beginner to PHP and am looking for some help with a program I am messing around with

Gerenate tabel in Php
I whant to generate a tabel takeing data from database like this one so the results to be display on

error reporting
hey everyone

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

Help With editting and deleting form
Hallo !!

So look at this image :

http://img194.imageshack.us/img194/8272/snapshot5f.pn

Wordpress IE issue
So I am trying to add the background shadow to my wordpress page. It works fine in Firefox but does

Form validation with functions
Hi there

I am trying to make a very simple form validation function. I currently have the fol

displaying unknown amount of results
I am reading a directory and getting a list of folders in the directory, I want to display the folde

Connecion issue
Hi,

For some reason, I keep getting this error when trying to connect:

Warning: mysql_

send message to the java application
Oracle 10g with Windows platform.

I have a java application that periodically pings the d

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