Ver Mensaje Individual
  #2 (permalink)  
Antiguo 11/03/2010, 14:46
Avatar de jmdz
jmdz
 
Fecha de Ingreso: marzo-2010
Ubicación: ¿Acá?
Mensajes: 54
Antigüedad: 14 años, 1 mes
Puntos: 2
Respuesta: como incrementar un il?

Código PHP:
Ver original
  1. <table width="300px" border="1">
  2. <tr>
  3. <th>Nºlist</th>
  4. <th>Nombre</th>
  5. <th>A.Paterno</th>
  6. <th>A. Materno</th>
  7. </tr>
  8. <?php  
  9. $i=1;
  10. $gn = mysql_query("SELECT * FROM `info` ORDER BY `apaterno`,`amaterno`,nombre ASC")  or die(mysql_error());
  11. while($n = mysql_fetch_array($gn)){
  12. echo "<tr align=\"center\">";
  13. echo "<td>".$i."</td>";
  14. echo "<td>".$n['nombre']."</td>";
  15. echo "<td>".$n['apaterno']."</td>";
  16. echo "<td>".$n['amaterno']."</td>";
  17. $i++;
  18. }
  19. ?>
  20. </tr></table>