Ver Mensaje Individual
  #2 (permalink)  
Antiguo 14/11/2010, 14:14
Avatar de santris
santris
 
Fecha de Ingreso: agosto-2009
Ubicación: Sant Feliu de Llobregat
Mensajes: 955
Antigüedad: 14 años, 8 meses
Puntos: 66
Respuesta: Como en listar 3 columnas Php MySQL

Hola,

Código PHP:
echo"<table>";
$i=1;
while(
$row mysql_fetch_array($result)) {
 if(
$i==1)
  echo
"<tr><td>$nombre</td>";
 if(
$i==2)
  echo
"<td>$nombre</td>"
 if(
$i==3){
  echo
"<td>$nombre</td></tr>";
 
$i=0;}
 
$i++;
}
//luego para cerrar bien la tabla fuera del while:

if($i==1)
 echo
"</table>";

if(
$i==2)
 echo
"<td></td><td></td></tr></table>";

if(
$i==3)
 echo
"<td></td></tr></table>""; 
Saludos
__________________
Tu álbum de cromos online!!

Última edición por santris; 14/11/2010 a las 14:22