Ver Mensaje Individual
  #6 (permalink)  
Antiguo 07/02/2011, 11:43
arros
 
Fecha de Ingreso: noviembre-2009
Mensajes: 535
Antigüedad: 14 años, 5 meses
Puntos: 25
Respuesta: Problema con el while

prueba esto:
Código PHP:
Ver original
  1. <table cellspacing="0" cellpadding="0" style="height: 95px;font-size:11px;margin-top:20px;font-family:arial">
  2. <?php
  3. $cons_usuario="SELECT * FROM usuario ORDER BY nombre";
  4. $resp_usuario=mysql_query($cons_usuario);
  5. $num=mysql_num_rows($resp_usuario);
  6. ?>
  7.  
  8. <?php
  9.  
  10. while ($datos_usu=mysql_Fetch_object($resp_usuario))
  11. {
  12.     for($i = 1; $i<7; $i++){
  13. ?>
  14. <tr>
  15. <td valign="top" style="padding-top:5px;background-color:white;height:122px; width:91px" align="center">
  16.  
  17. <img src="images/perfil/anonimo.png" id="imagen" style="width:80px;height:80px" onmouseover="this.src='images/perfil/verperfil.png ' "onmouseout="this.src='images/perfil/anonimo.png'"><br/>
  18.  
  19. <img src="<?php echo $datos_usu->avatar; ?>" style="width:80px;height:80px" id="imagen" onmouseover="this.src='images/perfil/verperfil.png ' "onmouseout="this.src='<?php echo $datos_usu->avatar; ?>'"><br/>
  20.  
  21. <div style="margin-top:2px">
  22. <?php echo $datos_usu->nombre; ?> <?php echo $datos_usu->apellido1; ?> <?php echo $datos_usu->apellido2; ?>
  23. </div>
  24. </td>
  25. <td style="width:10px; height: 122px;"></td>
  26. </tr>
  27. <?php
  28.     }
  29. }
  30. ?>
  31.  
  32. </table>