Ver Mensaje Individual
  #2 (permalink)  
Antiguo 05/03/2012, 12:36
ocp001a
Colaborador
 
Fecha de Ingreso: mayo-2008
Ubicación: $MX['VZ']['Xalapa']
Mensajes: 3.005
Antigüedad: 16 años
Puntos: 528
Respuesta: Mostrar imagenes en 4 columnas

con un contador:
Código PHP:
Ver original
  1. $col=1;
  2.     while ($file = readdir($filehandle)) {
  3.        if ($file != "." && $file != "..") {
  4.                 $tamanyo = GetImageSize($ruta . $file);
  5.                 echo "    
  6.               <div id=\"borde\">
  7.               <p><img src='$ruta$file' $tamanyo[15]><br></p>\n</div>";
  8.                if($col==4){
  9.                     echo '<br/>';
  10.                     $col=0;
  11.                }
  12.                $col++;
  13.            }
  14.         }