por fin lo he conseguido!!!!
os pongo lo que puesto
Cita:
<form id="form1" name="form1" method="POST" >
<table border="0" cellspacing="2" >
<?
// Primero, debemos ver nuestros elementos...
// DENTRO DEL DO WHILE METEMOS UN FOR CON CONTADOR
$columnas = 3;
do {
?>
<tr>
<?
for ($y = 0; $y < $columnas; ++$y){ ?>
<td><div align="center"><a href="<? echo $row[imagen_url]; ?>"><img src="<? echo $row[imagen_mini]; ?>" width="<?php echo $width_n; ?>" height="<?php echo $height_n; ?>" border="0"></a></div></td>
<? echo $y ;
$row = mysql_fetch_array($rs);
}
?>
</tr>
<?
} while ($row != 0);
?>
</table>
</form>
con el while ($row != 0) he conseguido que me siga el ciclo.
por si a alguien le sirve, ejeje
un saludo!!!