Ciao, perché do...while????

Fai così:

Codice PHP:

<?PHP
echo '<tr>';
while (
$row_foto mysql_fetch_assoc($foto)) 
{
echo 
'<td>';
echo 
$row_foto['percorso'];
echo 
'</td>';
}
echo 
'</tr>';
?>