It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming PHP and MySQL Forum

random file name

Moderator: Malcolm

random file name

Postby john_zakaria on Sun Aug 16, 2009 8:08 am

now i am getting all images in a file using the function glob
Code: Select all
$files = glob("../images/gallery/".$x."thumbnails/*.jpg")

after that i store it in an array
Code: Select all
foreach ($files as $value)

all that i need is to make the $value to produce random value from the array produced by foreach function...

when i echo the image i want it to be random.. thats all that i need
john_zakaria
50+ Club
 
Posts: 59
Joined: Sun Feb 08, 2009 7:29 am

Who is online

Users browsing this forum: No registered users and 0 guests