Ver Mensaje Individual
  #6 (permalink)  
Antiguo 18/07/2008, 05:42
elliotmoso
 
Fecha de Ingreso: septiembre-2006
Mensajes: 81
Antigüedad: 17 años, 7 meses
Puntos: 5
Respuesta: crear tabla con bucle

asi funciona bien:

Código PHP:
<?
$array  
= array("uno","dos","cuatro","cinco","nueve"); 
 
$vector count($array);

        echo 
'<table width="50" height="50" border="1" cellspacing="1" cellpadding="2"> ';
   
      for(
$j=0$j<=$vector$j++)
      {  
         echo 
'<tr>';         
         echo 
'<td>'.$array[$j].'</td>';
         echo 
'<td>'.$array[++$j].'</td>'//fila agregada!

         
echo '</tr>';
      }
      

 echo 
'</table>';

 
?>
saludos
elliot