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

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

Syntax error
hi im having a little trobble with this script
-------------------------------------------------

Forgot password won't work
My forgot password thing is not working properly. It is giving me this errorMailbox unavailable. The

Why does my php page download images over and over
Can anybody please explain to me why my php page keeps downloading the images and other items every

shoping cart issues
i´ve wrote this and works when i add an item to, my cart, but when i want to add othrer item just

Header redirect
Hello ive got a problem ive got form with its action set to itself.
Code: <form id="f

Not capturing all the information we require in the form.......
Hi Guys,

I was wondering if you would share some more of your knowledge today, I'm hoping it

problems with contact forms that are only protected against SQL injections
What could be a potential problem with contact forms that are only protected against SQL injections

upload only text files
hi guys i want to upload only text like like (pdf,note pad and ofiice files) so can any one please t

db entry based on primary key
My "topics" table contains 10 entires
*--------------*
topicid topic
------

Deleted Delivery but material wont return
We deleted a delivery but the material its still pending.

We made a reverse goods movemen

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