Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/05/2010, 08:07
Avatar de frankjoel86
frankjoel86
 
Fecha de Ingreso: noviembre-2008
Ubicación: Ica
Mensajes: 295
Antigüedad: 15 años, 6 meses
Puntos: 0
Sonrisa mysql_fetch_array -Forma horizontal

Hola gentita estoy en pininos de php, como haria para mostrar un array en forma horizontal, dejo el codigo.

<?php
include("cn.php");
$consulta=mysql_query("select *from productos", $conexion);
while($campo=mysql_fetch_array($consulta)){
?>

<table width="617" border="1" align="center">
<tr><th colspan="5" scope="col"><table width="336" border="1">
<tr><th width="104" scope="col"><table width="101" border="0" align="left">
<tr>
<th width="45" scope="col" bgcolor="#CCCCCC">Modelo</th>
<th width="46" scope="col" bgcolor="#CCCCCC">Precio</th>
</tr>
<tr>
<th scope="row"><?php echo $campo[descripcion]?></th>
<td><?php echo $campo[precio]?></td>
</tr>
<tr>
<th colspan="2" scope="row"><?php echo "<img src=$campo[img]>" ?></th>
</tr>
<tr>
<th scope="row"><img src="images/detalles.gif" width="71" height="19"></th>
<td><em><a href=""><img src="images/comprar.gif" width="70" height="19"></a></td>
</tr>
</table></th>
<th width="105" scope="col"><table width="101" border="0" align="left">
<tr>
<th width="45" scope="col">Modelo</th>
<th width="46" scope="col">Precio</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
<td>&nbsp;</td>
</tr>
<tr>
<th colspan="2" scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
<td>&nbsp;</td>
</tr>
</table></th>
<th width="105" scope="col"><table width="101" border="0" align="left">
<tr>
<th width="45" scope="col">Modelo</th>
<th width="46" scope="col">Precio</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
<td>&nbsp;</td>
</tr>
<tr>
<th colspan="2" scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
<td>&nbsp;</td>
</tr>
</table></th>
</tr>

</table></th>
</tr>
</table>
<?php
}
?>
*Aparece el primer producto en la 1ra celda, el segundo producto abajo, COMO AHORIA PARA QUE EL 2do producto aparesca al lado derecho de la 1ra celda y no abajo.

* se agradece cualquier ayuda.