
03/03/2004, 07:08
|
 | | | Fecha de Ingreso: marzo-2002
Mensajes: 110
Antigüedad: 23 años Puntos: 0 | |
Seria una cosa asi:
while ($row= mysql_fetch_array($resultados)){
$dato1 = $row["dato1"];
$dato2 = $row["dato2"];
echo "<table>
<tr>
<td>$dato1</td>
</tr>
</table>";
}
Esto te generara una tabla por cada registro que tengas en la bd.
Si lo que queres son tablas de distinto formato segun el registro, ahi vas a tener que empezar a usar if
ej:
while ($row= mysql_fetch_array($resultados)){
$dato1 = $row["dato1"];
$dato2 = $row["dato2"];
if($dato1 == "algo")
echo "<table>
<tr>
<td>$dato1</td>
</tr>
</table>";
else
echo "<table>
<tr>
<td>$dato1</td>
<td>$dato2</td>
</tr>
</table>";
}
Espero haber entendido bien
Saludos
Pichongol |