Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/10/2011, 16:40
Avatar de morfasto
morfasto
 
Fecha de Ingreso: julio-2011
Ubicación: Lima
Mensajes: 291
Antigüedad: 12 años, 9 meses
Puntos: 8
tabla con echo

Hola, que tal?

Estoy haciendo un codigo PHP para crear una tabla, y que cada fila de la tabla sea un link.

Este es mi codigo:
Código PHP:
<?php
echo "<table border='1'>";
echo 
"<tr>"
    
."<th>Campo1</th>"
    
."<th>Campo2</th>"
    
."<th>Campo3</th>"
    
."</tr>";
for (
$i=1;$i<=5;$i++)
    {
    echo    
"<a href='link".$i.".html'><tr>"
            
."<td>Dato".$i."</td>"
            
."<td>Caso".$i."</td>"
            
."<td>Numero".$i."</td>"
            
."</tr></a>";
    }
echo 
"</table>"
?>
Pero por alguna extraña razon, cuando veo el resultado, ninguna fila es link, que estoy haciendo mal?

Muchas gracias!