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

Form validation with functions
Hi there

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

Logic question
im wondering what's the best method to do the above list:

it is for alliance @ MMORPG game

help with insert
Hi there,

I am trying to insert some data into a database, but for some reason, it is not ins

array empty
Hiya peeps,

Ok here is the codes.

order.php

Code:

Amatuer requiring assistance
Beginner and amateur in need of assistance

My Site - (Spare Parts for Domestic Appliances)

EU VAT Package 2010
Does any one know whether SAP will be developing new reporting functionality due the new VAT rules t

Anti Spam Code
Ok where do i start? Probably by telling you I have very little working knowledge of PHP and that I

Get to know your fellow coder
I think it's time we got personal around here. There's a lot of code swapping and a few members kno

using a loop help
Hi guys , i need some help. I have this loop :
while ($row = mysql_fetch_assoc($Result)) { ?&

ORA-01655: unable to extend cluster SYS.C_FILE#_BLOCK# by 128
Hi all,

Oracle 10g. Linux.

I'm facing the below error while trying to import a dumpfil

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