Ver Mensaje Individual
  #4 (permalink)  
Antiguo 24/06/2011, 15:25
Avatar de repara2
repara2
 
Fecha de Ingreso: septiembre-2010
Ubicación: München
Mensajes: 2.445
Antigüedad: 14 años, 6 meses
Puntos: 331
Respuesta: matriz de imagenes

Te paso un ejemplo que puedes adaptar sin problemas:

Código PHP:
Ver original
  1. <?php
  2.  
  3. $array = array(1,2,3,4,3,2,3,4,3,4,5,6,6,5,6,7,8,7,8,9,8,7,6,5,4);
  4.  
  5. $cols = 10;
  6.  
  7. $output = "<table>";
  8. for($i = 1; $i<count($array); $i++){
  9.     if($i%$cols==1) $output .="<tr>";
  10.     $output .="<td>$i</td>";
  11.     if($i%$cols==0) $output .="</tr>";
  12. }
  13. $output .= "</table>";
  14. echo $output;
  15.  
  16. ?>

Salu2,
__________________
Fere libenter homines, id quod volunt, credunt.