sempre che in $row['immagine '] ci salvi il path relativo all'Immagine...
Codice PHP:
<?php
$nr = $lunghezza;
#$nr = 55; test
$colonne = 2;
$righe = ceil($nr/$colonne);
echo "<table align='center' border='1'>";
for ($r = 0; $r < $righe; $r++)
{
echo "<tr>";
for ($c = 0; $c < $colonne; $c++)
{
echo "<td>test
[img]{$row[immagine]}[/img]</td>";
}
echo "</tr>";
}
echo "</table>";
?>