Ver Mensaje Individual
  #13 (permalink)  
Antiguo 13/03/2008, 16:51
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Re: gererar tabla para imagenes

Prueba asi:
Código PHP:
$list_ignore = array('.','..','index.php');
if(
$getdir opendir($dir)){
    echo 
"<table border='1'>";
    
$col 5;
    
$i 1;
    echo 
"<tr>";
    while((
$foto readdir($getdir)) !== false) {
            echo 
"<td>";
            if(!
in_array($foto$list_ignore)){
                echo 
"Nombre: $foto: Tipo: "filetype ($dir $foto) . "<br>";
                echo 
"<img src='$dir$foto'>";
            }
            echo 
"</td>";
            
$resto = ($i $col);
            if(
$resto == 0){echo "</tr><tr>";}
            
$i++;    
        }
        echo 
"</tr>";
        echo 
"</table>"
    }
     
closedir($getdir);

Saludos.