Ver Mensaje Individual
  #20 (permalink)  
Antiguo 04/05/2008, 13:18
Avatar de .php
.php
 
Fecha de Ingreso: julio-2006
Mensajes: 481
Antigüedad: 17 años, 9 meses
Puntos: 5
Re: Que muestre 2 fotos por columnas

el mismo codigo, pero averigua cuantas filas tiene tu cinsukta y se llega a la ultima muestra el <td> sin importar si es par o no o si la idAux esta vacia

Código PHP:
$contador   0;
$num_filas  mysql_num_rows($resultado);
while (
$row mysql_fetch_array($resultado)) {
$id $row["id"];
  if((
$id <> $idAux and $idAux!="") or ($contador == $num_filas)){
    echo 

      <tr>
        <TD width='283' height='158' ALIGN='CENTER' valign='top'><img src='ver.php?id=$id' width='182' height='154'></TD>
        <TD width='283' height='158' ALIGN='CENTER' valign='top'><img src='ver.php?id=$idAux' width='182' height='154'></TD>
      </tr>"
;
    unset(
$idAux);
  }else{
      
$idAux $id;
  }
  
$contador++;
}
echo 
"</table>"
ojala que funcione a la primera, no he provado el codigo, casi nunca compilo
__________________
~~[FiDeLio]~~