![]() |
Maybe someone can explane me this code
So I'm trying to make a simple php gallery. So far I made the uploading form and file. But when I searched the internet for "How to get those pics on the page" and I found this code;
PHP Code:
|
Quote:
You can do print_r($files) and it should show you each key set between the value. To me it should look like this: Code:
array = (To me it's basically putting all the files names inside an Array, then you can do that foreach and it should output the image from using $files[$i] as since $i is incrementing. |
Quote:
$ava is handle created with the opendir function that contains the path to where the pictures are stored, the script then loops through the directory using checking to make sure the file string is not either of the dots, then it echos a formated text string with the array, the method used is unnecesary this is a better example PHP Code:
you could ofcourse use the object oriented method using dir() or glob() as wildhoney is so fond of. |
Quote:
|
| All times are GMT. The time now is 08:46 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0