He mirado el post interesante
este código de aquí abajo el ultimo y mas grande en principio crea un <tr> osea deveria de meter
mi <td> dentro.
Código PHP:
<td width="28%" class="centro"><img src="imagen/<?php echo $row['nombre'];?>" width="128" height="115" class="centro" /><br /> <?php echo $row['lugar'];?><br /> <?php echo $row['precio'];?> Euros </td>
esto que pone en el código tendría que hacer esto.???
$total = 32; // total?
cambiaria el numero por mi variable de mis registros????
o donde meto mi código deveria de ser como 0,1 cada uno de mis regristro
osea mi <td>
0,3 1,3 2,3
0,2 1,2 2,2
0,1 1,1 2,1
pero no me funciona alguien sabe???????ayudarme
Código PHP:
<?php
// En este modo, notamos que abrimos un <tr> inicial...
// ...que extraño no?
echo '<table style="border: 1px inset" border="1"><tr>';
$columnas = 3;
$filas = 3;
$inicial = 0;
$total = 32; // total?
while ($inicial < $total)
{
echo '<td>';
// rutinas...
echo "$inicial,$filas";
echo '</td>';
// break!
if (++$inicial == $columnas)
{
if (!(--$filas))
{
break;
}
// cerramos y continuamos...
echo '</tr><tr>';
$inicial=0; // debemos resetear!!!
}
}
// cerramos ambos...
echo '</tr></table>';
?>