Ver Mensaje Individual
  #3 (permalink)  
Antiguo 13/01/2015, 13:48
mauritosuarez
 
Fecha de Ingreso: octubre-2014
Ubicación: Buenos Aires
Mensajes: 278
Antigüedad: 9 años, 6 meses
Puntos: 12
Respuesta: Ordenar filas php y mysql

Hola LoUiMaNiAkO, una vez que ya tengas la variable con datos extraídos de la consulta haces algo como lo siguiente.

Código PHP:
Ver original
  1. <table class="bordered" style="padding:3px; color:#000000;">
  2.             <tr style="color:#000000;">
  3.                 <th>Foto</th>
  4.                 <th>Apellido</th>
  5.                 <th>Nombre</th>
  6.             </tr>
  7.             <?php for($i=0; $i<sizeof($reg); $i++) { ?>
  8.             <tr>
  9.                 <td>
  10.                     <a href="javascript:popup('DatosEmpleados.php?leg=<?php echo $reg[$i]["Legajo"]; ?>',550,340)">
  11.                         <img title="<?php echo $reg[$i]["Apellido"] ;?> <?php echo $reg[$i]["Nombre"] ;?>" src="images/Fotos/thumbl/<?php echo $reg[$i]["Foto"] ;?>" width="35" height="35" />
  12.                     </a>
  13.                 </td>
  14.                 <td>
  15.                     <?php echo $reg[$i]["Apellido"] ;?>
  16.                 </td>
  17.                 <td>
  18.                     <?php echo $reg[$i]["Nombre"] ;?>
  19.                 </td>          
  20.             </tr>
  21.             <?php } ?>
  22.             </table>

Espero te sea de utilidad.

Saludos.
__________________
http://www.sp-vision.net