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

parse error
On my local machine I keep getting parse error for my footer. When I put it online, it doesn't show

Redistributing dependent dlls
Hai all ,

I have created an application in VC++ using VS2008 in a development machine which r

Working with popups and such in a class
I've recently started building my applications completely enclosed in classes. I like the fact that

captcha error
I have been trying to implement a captcha in php...

here is the code..
Code: (php) [Select

media recovery
Hi,
i startup the database i got the error

SQL> startup
ORACLE instance started.

Secure FTP
Hi experts,
There is no SFTP action in MII workbench.
This means it needs developing custo

Using Windows message as a Handle
Hi,

I am writing one of my first multithreaded programs.

In one of the thread,

please help me... my password gets encrypted but not able to get in database
hai guys,
please help me... in the following function my password gets encrypted but no

grouping within a foreach?
hello all,

I currently have a list of products spit out from my db via a foreach loop. Right

Typing math
I've added support for typesetting math using LaTeX on the forums.

Example:
Code: [Select]

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