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

need help in mysql_num_rows()
please tell me what i am doing wrong in this query. it displays this error

Code: Warning: mys

Add 5 to a variable when a button is clicked, and re-run a for loop
So I'm making a feedback sort of section on a website with MySQL and PHP, I've gotten the script to

Pagination won't carry results past page 2.
Hi all,

I've worked out my pagination script and its paginating fine until I click next from

Not reloading page after php form submit
Hello helpful souls out there. You guys have come through for me in the recent past and I'm hoping s

my code does not work.
I have a code problem.

Quote"<a href=index.php?gogo=ureticidetay&'?l={$le

onClick='location.href=index.htm'> not working
Below is my code:

echo "<input type='button' value='redirect' onClick='location.h

INSERT for date range
Hi all

I have the following table

Code: [Select] `date` date
`day` int(2)
`

Pre-Fill out a PHP form...??
This is for work actually (geek squad). We have to fill out this online php form at work over and ov

Transport data between itab and textfield on ALV event
Hallo,

I have a ALV Grid ( cl_gui_alv_grid ) and I also have hotspot click event with a h

PHP - HTML
Could anyone give me some GOOD sample links for php - html email tutorial.

Thanks!

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