Ver Mensaje Individual
  #4 (permalink)  
Antiguo 11/11/2015, 03:52
javierconesa23
 
Fecha de Ingreso: febrero-2011
Ubicación: Barcelona
Mensajes: 195
Antigüedad: 13 años, 2 meses
Puntos: 1
Respuesta: crear un bucle para leer varios registros en html

eso que comento con este codigo:
Código PHP:
Ver original
  1. echo '<table class="table table-bordered table-striped datatable" id="table-2">';
  2. echo    '<thead>';
  3. echo        '<tr>';
  4. echo            '<th>';
  5. echo                '<div class="checkbox checkbox-replace">';
  6. echo                    '<input type="checkbox" id="chk-1">';
  7. echo                '</div>';
  8. echo            '</th>';
  9. echo            '<th>Contrato</th>';
  10. echo            '<th>Cliente</th>';
  11. echo            '<th>Cupo</th>';
  12. echo            '<th>Matricula</th>';
  13. echo            '<th>DNI PASAPORTE</th>';
  14. echo            '<th>Matricula</th>';
  15. echo            '<th>Nombre</th>';
  16. echo        '</tr>';
  17. echo    '</thead>';
  18.    
  19. echo    '<tbody>';
  20. echo        '<tr>';
  21. echo            '<td>';
  22. echo                '<div class="checkbox checkbox-replace">';
  23. echo                    '<input type="checkbox" id="chk-1">';
  24. echo                '</div>';
  25. echo            '</td>';
  26. echo            '<td>Randy S. Smith</td>';
  27. echo            '<td>8.7</td>';
  28. echo            '<td>Social and human service</td>';
  29. echo            '<td>';
  30. echo                '<a href="#" class="btn btn-default btn-sm btn-icon icon-left">';
  31. echo                    '<i class="entypo-pencil"></i>';
  32. echo                    'Edit';
  33. echo                '</a>';
  34.                
  35. echo                '<a href="#" class="btn btn-danger btn-sm btn-icon icon-left">';
  36. echo                    '<i class="entypo-cancel"></i>';
  37. echo                    'Delete';
  38. echo                '</a>';
  39.                
  40. echo                '<a href="#" class="btn btn-info btn-sm btn-icon icon-left">';
  41. echo                    '<i class="entypo-info"></i>';
  42. echo                    'Profile';
  43. echo                '</a>';
  44. echo            '</td>';
  45. echo        '</tr>';
  46.        
  47. echo        '<tr>';
  48. echo            '<td>';
  49. echo                '<div class="checkbox checkbox-replace">';
  50. echo                    '<input type="checkbox" id="chk-1">';
  51. echo                '</div>';
  52. echo            '</td>';

Melo pinta si

NumCliente: 47564
3 | 47564 | 80317048-10 | 4764 AFR | 39654225L | 2015-11-04 | 09:00:00.0000000 | Confirmada | 126
4 | 47564 | 80317048-10 | 4764 AFR | 39654225L | 2015-11-05 | 09:00:00.0000000 | Confirmada | 126
4 | 47564 | 80317048-11 | 4764 AFR | 39654225L | 2015-11-05 | 09:00:00.0000000 | Confirmada | 126
Respuesta en 0 segundos

Contrato Cliente Cupo Matricula DNI PASAPORTE Matricula Nombre

Randy S. Smith 8.7 Social and human service EditDeleteProfile


entonces pienso tengo que montar las tablas fuera del php para que me lo ejecute antes pero me doy cuenta que fuera del php como aun no ha leido el foreach , no puedo montar el resultado dentro de la tsabla


Espero puedas ayudarme
GRacias