Ver Mensaje Individual
  #2 (permalink)  
Antiguo 01/02/2007, 10:18
Avatar de gerson
gerson
 
Fecha de Ingreso: febrero-2005
Ubicación: Lima
Mensajes: 481
Antigüedad: 21 años, 7 meses
Puntos: 4
Re: Mostrar resultados Mysql

Código PHP:
function veure_pelis($pelis_array) 
{ 
  
//mostra pelis pasades per array 
  
if (!is_array($pelis_array)) 
  { 
     echo 
"<br>No hi han películes<br>"; 
  } 
  else 
  { 
    
//crear tabla 
    
echo "<table width = \"100%\" border = 0><tr>"; 

     
    foreach (
$pelis_array as $row) 
    { 
      
$url = "veurepelis.php?isbn=".($row["imatge"]); 
      echo 
"<td align=\"center\">"; 
      if (@
file_exists("imatges/".$row["imatge"].".jpg")) 
      { 
        
$titol = "<img src=\"imatges/".($row["imatge"]).".jpg\" border=0>"; 
        
do_html_url($url, $titol); 
      } 
      else 
      { 
        echo 
"&nbsp;"; 
      } 
      echo 
"<br>"; 
      
$titol =  $row["titol"]; 
      
do_html_url($url, $titol); 
      echo 
"</td>"; 
    } 
    echo 
"</tr></table>"; 
  } 
  echo 
"<hr>"; 
} 
ahora si quieres mostrarlos en varias filas tendiras q hacer un contador para q puedas hacer "<tr>....</tr>" para la nueva fila.