a lógica de como fazer a tabela eu já tinha mais ou menos, mas usei a sua mesmo hehehe... valeu! mas assim, eu não estou conseguindo dividir os resultados que eu tenho no mysql na tabela, nesse código q eu vou colocar abaixo, aparece a mesma foto em todas as células da tabela, e teria que ser uma foto pra cada célular, dá uma olhada por favor: <?php
$busca = "select nome_arq from arquivos where cod_carro='$cod_carro' and tamanho_arq <> 0";
$query = mysql_query($busca, $cn) or die (mysql_error());
$total = 20;
$inicio = 1;
$auxiliar = 0;
echo "<table width=\"750\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">";
while ($res = mysql_fetch_array($query)){
$foto = $res['nome_arq'];
while ($inicio <= $total){
if ($auxiliar == 0){echo "<tr>";}else{}
echo "<td><img src='$url/imagem.php?arquivo=$foto' heigth='50px' width ='100px'></td>";
if ($auxiliar == 4){echo "</tr>"; $auxiliar=0;}else{$auxiliar++;}
$inicio++;
}
}
echo "</table>";
?>