View Single Post
Old 01-23-2008, 09:28 PM   #1 (permalink)
karq
The Wanderer
 
Join Date: Jan 2008
Posts: 12
Thanks: 0
karq is on a distinguished road
Default 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:
<?php
$ava
=opendir("failid/");
$i=0;
while (
$lisa=readdir($ava)){
if (
$lisa !="." && $lisa !="..") {
$files[]=$lisa;
echo 
'<tr><td><img src="failid/'.$files[$i].'" height="150" width="200"></tr></td>';
$i=$i+1;
}
}
closedir($ava);
?>
It works, but I dont understand it, maybe someone can explane?
karq is offline  
Reply With Quote