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

PHP/Database issue
My friend is helping me make a database where you go to a certain webpage of my site and the page wi

Small problem with image resize script
Hi!

I am a little bit new to php and I have an issue installing an image resize script I down

session variable problem
Session variable is not working in Fire fox i am getting null value but it is working fine in IE.

Progress bar tracking file downloads
Hey guys, was wondering if there was a way to track how far a file has been downloaded. I know there

How do I send data using an html link
Hi

If I have
<a href="main_file.php">

How do I send data t

file_put_contents and createimagefromjpeg
All,
I do somethings and then I have the following code:
file_put_contents('./test/'.$filename

Multidimensional $_POST
Hello

How to get a single array from array of array (2 - dimension).
For example I have a

echo $rows help
Hi all,

Hopefully something simple that I don't know!

I have this:

Code: [Selec

noob cURL help
I have a pretty basic form that I need to cURL post to a file in my includes folder (includes/login.

How could I do this?
Ive got a simple lottery game, and am using an sql database to keep track of the numbers bought. But

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