Ver Mensaje Individual
  #9 (permalink)  
Antiguo 06/08/2012, 15:01
Avatar de patriciomase
patriciomase
 
Fecha de Ingreso: abril-2012
Ubicación: Mar del Plata
Mensajes: 323
Antigüedad: 12 años
Puntos: 34
Respuesta: problema con array obtenido de una consulta

sería algo así, no está probado lo escribo así al vuelo

Código PHP:
Ver original
  1. /** mi tabla1 */
  2. $tabla1 =  "<table><tr><th>enca1</th><th>enca2</th></tr>";
  3. /**mi tabla2*/
  4. $tabla2 = "<table><tr><th>enca1</th><th>enca2</th></tr>";
  5.  
  6. while($row1 = mysql_fetch_assoc($query)) {
  7. $tabla1 .= "<tr><td>".$row1['id']."</td><td>".$row1['dato1']."</td><td>".$row1['dato2']."</td></tr>";
  8. $tabla2 .= "<tr><td>".$row1['id']."</td><td>".$row1['dato3']."</td><td>".$row1['dato4']."</td></tr>";
  9. }
  10. $tabla1 .="</table>";
  11. $tabla2 ="</table>";
  12.  
  13. echo $tabla1;
  14. echo $tabla2;

es un poco cutre pero tiene que andar