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

php include email form with attachment
I have had no luck with finding a email form all over the Internet for various reasons. Some insecur

Removing Title From database problem
Hi again ! i am having an issue with updating database. When i update any price of a title it remove

Email Script does not reach destination
Hey Guys look at this code snippet :
Code:
//read a line from the file

$myFile = "

Need help with PHP/MySQL drop down menu
I need help on how I can implement a drop down menu which queries mysql database and output the avai

present value of sequence?
Hi

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

Thanks

Creating XML with php
I need to creat an XML with php and have successfully produced a valid output.
The problem I hav

Open browser page depending on XML results
Hello,

I have some PHP code that sends webbased from data to an external url ( in the form of

New Search Engine problem
Hey everyone,

I have a ZIP Code Radius search engine already functional. it displays all of t

extract content from a website
i have written a code that will grab the content from the index page..
i would like to know how c

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