Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Ola pessoal alguem pode me ajudar a montar uma estrutura menos complicada para gerar tabela com linhas e colunas pois este modelo abaixo funciona mas tudo que fica abaixo no final da tabela ele entende que faz parte da tabela e poe dentro dela !!!
por exemplo uma div nao fica como rodapé porque entra dentro da tabela ...sera que tem algo de errado na estrutura tentei e nao achei o erro !!!
Se alguem puder ajudar com uma estrutura mais simples ou ajudar a descobrir onde esta o erro agradeço muito
<?php echo "<table>";
$total = mysql_num_rows($sql);
?>
<?php $colunas = "4"; ?> // numero de colunas
<?php
if ($total>0) {
for($i=0;$i<$total;$i++) {
if (($i%$colunas)==0) {
echo "</tr>";
}
?>
<?php
$dados = mysql_fetch_array($sql);
$id = $dados["id"];
$montadora = $dados["montadora"];
$modelo = $dados["modelo"];
$ano = $dados["ano"];
$valor = $dados["valor"];
$placa = $dados["placa"];
$miniatura = $dados["imagem"];
list ($foto1) = split('[;]',$miniatura);
if($foto1 == "veiculos/")
{
$foto1="images/nocarro.jpg";
}
$montadora_atual=$vdados["montadora"];
$vconsulta2=mysql_query("SELECT * FROM montadora WHERE montadora like $montadora'");
$vdados2=mysql_fetch_array($vconsulta2);
$fotoo=$vdados2["foto"];
$montadora=$vdados2["montadora"];
/ Estrutura da tabela --------------------------- /
print "
<td><table width=\"200\" align=\"center\" border=\"0\" cellspacing=\"3\" cellpadding=\"10\" bordercolor=\"#CCCCCC\" > <tr> ";
print "
<td width=\"150\" align=\"center\" bgcolor=\"#E3E3E3\">
<a href=javascript:; onClick= javascript:show('detalhes.php?id=$id&keepThis=true&TB_iframe=true&height=500&width=600');return false;>
<br/> $modelo <br/> <br/>
<img src='gera_thumb.inc.php?imagem=$foto1&x=200'border=\"0\" align=\"center\">
</br> <br/><br/> $ano - $valor <br/></br> </a>
</td>
</tr>
</table></td> ";
/ Finaliza estrutura da tabela ------------------ /
}
} else {
echo "Nenhum registro encontrado";
}
?>>
Tá faltando fechar o resto da tabela:
</tr></table>
Tentei fechar a tabela e o resultado foi que gerou uma tabela com uma só coluna !!! :wacko:
Poste o resultado gerado pelo seu PHP dentro de
>
Poste o resultado gerado pelo seu PHP dentro de
[/quote]
[spoiler][code]
<div id="list" align="center">
<div id="conteudo" align="center">
<table>
<tbody><tr><td><table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=791&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> a3 1.6 <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/e351ca4e660beeab93ae52cc428c407aDSC02046.JPG&x=200" align="middle" border="0">
<br> <br><br> 2000 - <br><br> </a>
</td>
</tr>
</tbody></table></td></tr></tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=707&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> audi a3 <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/e28c020f31c224cc3ac789f5a7189591DSC01296.JPG&x=200" align="middle" border="0">
<br> <br><br> 2000 - consultar <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=852&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> vectra gl <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/0eaf59cb7d83109cedefaf3e7a148cf7DSC02586.JPG&x=200" align="middle" border="0">
<br> <br><br> 1999 - 18.900,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=830&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> motana conquest <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/8b2da1e0814ff47e3c1c8658abd32c48DSC02542.JPG&x=200" align="middle" border="0">
<br> <br><br> 2009 - 28.500,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=859&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> corsa hatch <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/50be4e181f5e98477aff38831b98e524DSC02572.JPG&x=200" align="middle" border="0">
<br> <br><br> 2003 - 23.500,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=856&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> corsa classic life <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/5ba7bc675f4d8b1941a3b7c0bc09dfddDSC02553.JPG&x=200" align="middle" border="0">
<br> <br><br> 2008 - 22.500,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=850&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> corsa wind <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/17dee46611d83800bfb0c8a1995fad5bDSC02650.JPG&x=200" align="middle" border="0">
<br> <br><br> 1996 - 10.900,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=860&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> vectra elegance <br> <br>
<img src="gera_thumb.inc.php?imagem=images/nocarro.jpg&x=200" align="middle" border="0">
<br> <br><br> 2006 - 35.500,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=831&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> vectra gl <br> <br>
<img src="gera_thumb.inc.php?imagem=images/nocarro.jpg&x=200" align="middle" border="0">
<br> <br><br> 1998 - 18.800,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=827&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> corsa super <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/40d0aa01d946811678845af763e7b25dDSC02427.JPG&x=200" align="middle" border="0">
<br> <br><br> 1997 - 13.800,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=808&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> silverado 4.1 <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/73172a1c5db80883ea7e71b93962ea91DSC02210.JPG&x=200" align="middle" border="0">
<br> <br><br> 1997 - 32.800,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=728&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> opala <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/bbf8a7ff5699b3ec3f3d2938686de7e3DSC01573.JPG&x=200" align="middle" border="0">
<br> <br><br> 1978 - vendido <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=802&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> montana conquest <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/ed408af6d64435440dab07218c83179cDSC02162.JPG&x=200" align="middle" border="0">
<br> <br><br> 2006 - 25.800,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=849&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> xsara picasso exclusive <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/251e8c928f96a358039a2a8aa246b438DSC02452.JPG&x=200" align="middle" border="0">
<br> <br><br> 2005 - 29.800,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=851&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> palio week stile <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/6a20245000cc5d9bb69b0890fa4992eaDSC02488.JPG&x=200" align="middle" border="0">
<br> <br><br> 1997 - 15.900,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=750&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> palio Week adventure <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/b86b1a46e09bdae9656ca70549a96bcaDSC01536.JPG&x=200" align="middle" border="0">
<br> <br><br> 2002 - 24.800,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=854&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> stilo conetc flex <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/21fa709d79970a943e4b2b6aed3293a0DSC02548.JPG&x=200" align="middle" border="0">
<br> <br><br> 2006 - 33.800,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=809&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> palio fire flex celebration <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/285486b9dc1dd23b4f8f97ee6c09ea3aDSC02222.JPG&x=200" align="middle" border="0">
<br> <br><br> 2008 - 27.800,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=783&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> marea week hlx <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/6ee7c4328118b96d75213c92037ea1e8DSC02087.JPG&x=200" align="middle" border="0">
<br> <br><br> 1999 - 16.900,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=785&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> palio elx <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/69ab1b113c30e5c0609ceb49fc3c958cDSC01962.JPG&x=200" align="middle" border="0">
<br> <br><br> 1999 - 14.900,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=861&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> palio ed <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/a90d419b678aaff9d5c0790288976307DSC02635.JPG&x=200" align="middle" border="0">
<br> <br><br> 1998 - 13.800,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=751&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> palio week adventure <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/42923f2203dc43e7664f09d3edf6f4b2DSC01543.JPG&x=200" align="middle" border="0">
<br> <br><br> 2004 - 26.800,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=855&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> siena elx <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/1da4916a5a0929e5f019ea88d0b8eed3DSC02583.JPG&x=200" align="middle" border="0">
<br> <br><br> 2001 - 21.500,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=822&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> ka flex <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/333d0f6d490152fb56566f34b3eeb3e7DSC02404.JPG&x=200" align="middle" border="0">
<br> <br><br> 2009 - 26.500,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=848&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> focus sedan 1.6 <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/f5f204686748022773ac4294be866b6eDSC02446.JPG&x=200" align="middle" border="0">
<br> <br><br> 2007 - 32.800,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=863&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> fiesta hatch <br> <br>
<img src="gera_thumb.inc.php?imagem=images/nocarro.jpg&x=200" align="middle" border="0">
<br> <br><br> 2007 - 23.900,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=864&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> ka <br> <br>
<img src="gera_thumb.inc.php?imagem=images/nocarro.jpg&x=200" align="middle" border="0">
<br> <br><br> 2009 - 24.500,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=835&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> fiesta hatch <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/87fc0eea7d42ffce2ed9fa87b818bd9cDSC02632.JPG&x=200" align="middle" border="0">
<br> <br><br> 2008 - 28.500,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=862&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> escort l <br> <br>
<img src="gera_thumb.inc.php?imagem=images/nocarro.jpg&x=200" align="middle" border="0">
<br> <br><br> 1988 - 5.800,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=833&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> ecosport xls 1.6 <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/d0f81a62ac80558bd9551fa30f79d352DSC02482.JPG&x=200" align="middle" border="0">
<br> <br><br> 2007 - 41.900,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=834&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> escort gl sw <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/19261a0eca06a6cdd1419d63f0112f1fDSC02476.JPG&x=200" align="middle" border="0">
<br> <br><br> 2000 - 13.900,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=837&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> l 200 sport 4x4 gls <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/eb6ce2b900283457919d9f993b12bdc2DSC02659.JPG&x=200" align="middle" border="0">
<br> <br><br> 2005 - 58.900,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=754&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> cb 600f hornet <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/f03ecc9c69919fe15850448d71193c3eDSC01651.JPG&x=200" align="middle" border="0">
<br> <br><br> 2008 - 27.500,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=161&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> YZF 250 4T <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/e25680a0758d7211c160d7af59186734DSC05591.jpg&x=200" align="middle" border="0">
<br> <br><br> 2004 - vendida <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=838&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> megane grand tour dinamique <br> <br>
<img src="gera_thumb.inc.php?imagem=images/nocarro.jpg&x=200" align="middle" border="0">
<br> <br><br> 2007 - 39.800,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=853&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> clio rn sedan 1.6 <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/caa0c2a6cfaf0f97037a2be5f638c180DSC02564.JPG&x=200" align="middle" border="0">
<br> <br><br> 2001 - 17.500,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=843&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> megane grand tour dynamique <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/a1a749e17cc9d7a81da07e67ccce98f6DSC02440.JPG&x=200" align="middle" border="0">
<br> <br><br> 2009 - 41.000,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=755&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> dl 1000 v-stron <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/ba854a4452b393649447bccb61c166dfDSC01611.JPG&x=200" align="middle" border="0">
<br> <br><br> 2007 - 30.800,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=736&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> corola filder <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/1b855b3872146bc0dca3cb88a0d79149DSC01582.JPG&x=200" align="middle" border="0">
<br> <br><br> 2005 - 35.000,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=824&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> COROLLA SEG 1.8 VVT <br> <br>
<img src="gera_thumb.inc.php?imagem=images/nocarro.jpg&x=200" align="middle" border="0">
<br> <br><br> 2003 - consultar <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=826&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> corolla xei 1.8 vvt <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/457bff18ad851a9e414c781eee72b8c1DSC02533.JPG&x=200" align="middle" border="0">
<br> <br><br> 2005 - 35.800,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=407&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> FUSCA 1200 <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/ca489c7a797842323024d08e83bdc286DSC08586.JPG&x=200" align="middle" border="0">
<br> <br><br> 1962 - 10.000,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=839&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> gol g3 1.0 <br> <br>
<img src="gera_thumb.inc.php?imagem=images/nocarro.jpg&x=200" align="middle" border="0">
<br> <br><br> 2005 - 16.900,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=800&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> parati gls turbo <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/a81e6770b5f6f3964b34292bbd52945bDSC02153.JPG&x=200" align="middle" border="0">
<br> <br><br> 1993 - 16.800,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=840&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> gol special <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/6b5cb9a9c23b936509322353930d2815DSC02415.JPG&x=200" align="middle" border="0">
<br> <br><br> 2003 - 17.900,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=842&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> santana gls <br> <br>
<img src="gera_thumb.inc.php?imagem=images/nocarro.jpg&x=200" align="middle" border="0">
<br> <br><br> 1991 - 9.800,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=793&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> santana 1.8 <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/5da455e0c7bb69c8c5b938be08476028DSC02109.JPG&x=200" align="middle" border="0">
<br> <br><br> 1999 - 17.500,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=761&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> golf gti <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/358a9964af095f15eb395f65a45af194DSC01705.JPG&x=200" align="middle" border="0">
<br> <br><br> 2003 - 36.800,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=818&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> parati 16v <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/0a319f598e51c79d37f4cd00d4f18cfbDSC02300.JPG&x=200" align="middle" border="0">
<br> <br><br> 1999 - 17.900,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=846&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> gol gts <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/834f8ccb04296969556f6dfa695819dcDSC02458.JPG&x=200" align="middle" border="0">
<br> <br><br> 1993 - 13.300,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=847&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> gol 1000 <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/92a76b5cdc8573f1ca1ec46120e6f219DSC02464.JPG&x=200" align="middle" border="0">
<br> <br><br> 1994 - 10.500,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=766&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> gol 1000i <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/a765d737cd538f662d1f530952cb0618DSC01712.JPG&x=200" align="middle" border="0">
<br> <br><br> 1996 - 12.500,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=797&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> gol 16v <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/b434371165d0f1cdf2485facdb2198f8DSC02176.JPG&x=200" align="middle" border="0">
<br> <br><br> 1999 - 14.500,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=865&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> gol g3 1.0 <br> <br>
<img src="gera_thumb.inc.php?imagem=images/nocarro.jpg&x=200" align="middle" border="0">
<br> <br><br> 2001 - 19.800,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=710&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> gol g4 1.0 <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/e39af4871efc250508e535c6defd21efDSC01319.JPG&x=200" align="middle" border="0">
<br> <br><br> 2006 - 24500,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=787&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> gol 16v <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/cae06a4ed807e37d1065c12bf851466eDSC02071.JPG&x=200" align="middle" border="0">
<br> <br><br> 1999 - 14.500,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=858&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> kombi furgao <br> <br>
<img src="gera_thumb.inc.php?imagem=images/nocarro.jpg&x=200" align="middle" border="0">
<br> <br><br> 2002 - 17.900,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=786&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> passat turbo <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/fdf6c15d5a308f1ec7f8304dda462f59DSC02040.JPG&x=200" align="middle" border="0">
<br> <br><br> 1999 - 21.000,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=798&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> polo hatch 1.6 <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/394286a53fc7a97a2deaddb3ca98ab4eDSC02189.JPG&x=200" align="middle" border="0">
<br> <br><br> 2003 - 25.900,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=825&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> gol cl star <br> <br>
<img src="gera_thumb.inc.php?imagem=images/nocarro.jpg&x=200" align="middle" border="0">
<br> <br><br> 1989 - 5.900,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=820&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> gol g4 1.0 <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/393e6738579cfd296386b3a7ae8ecec6DSC02389.JPG&x=200" align="middle" border="0">
<br> <br><br> 2006 - 19.800,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=744&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> parati gls <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/458047865112bcb4b5565466c5e1d1cfDSC01801.JPG&x=200" align="middle" border="0">
<br> <br><br> 1995 - 15.800,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=746&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> parati 1.0 <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/cf09e7ba1fd4dcaffd5f21744a53c026DSC01814.JPG&x=200" align="middle" border="0">
<br> <br><br> 2002 - 20.800,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=867&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> parati 16v giii <br> <br>
<img src="gera_thumb.inc.php?imagem=images/nocarro.jpg&x=200" align="middle" border="0">
<br> <br><br> 2001 - 18.800,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=866&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> gol special <br> <br>
<img src="gera_thumb.inc.php?imagem=images/nocarro.jpg&x=200" align="middle" border="0">
<br> <br><br> 2002 - 14.300,00 <br><br> </a>
</td>
</tr>
</tbody></table>
<table align="center" border="0" bordercolor="#CCCCCC" cellpadding="10" cellspacing="3" width="200"> <tbody><tr>
<td align="center" bgcolor="#E3E3E3" width="150">
<a href="javascript:;" onclick="javascript:show('detalhes.php?id=821&keepThis=true&TB_iframe=true&height=500&width=600');return" false;="">
<br> gol special <br> <br>
<img src="gera_thumb.inc.php?imagem=veiculos/9a60195135f535790e8dc8c08f0c4a94DSC02421.JPG&x=200" align="middle" border="0">
<br> <br><br> 1999 - 13.900,00 <br><br> </a>
</td>
</tr>
</tbody></table> </div>
</div>
<div class="clear"></div>
<div id="footer">
<a href="http://www..com.br" target="_blank"><br> Desenvolvido Todos os Direitos Reservados </a>
</div>Bom, você deveria fazer em tableless que seria muito mais fácil. Mas ainda assim, se prefere tabelas:
<?php
// Apenas obtendo um resource do SQL. Estas duas linhas DEVEM ser removidas
$conn = mysql_connect();
$sql = mysql_query('SHOW TABLES FROM mysql');
$columns = 4; // Número de colunas por linha:
// Essa função será responsável por converter o Array do SQL em HTML
function toTable($rows)
{
return sprintf("\n\t<tr>%s\n\t</tr>", implode($rows));
}
// Jogando o resultado do banco em um Array.
// Troque $sql pela variável que contem o resource da sua consulta
while (FALSE !== ($row = mysql_fetch_row($sql))) {
$rows[] = sprintf("\n\t\t<td>%s</td>", $row[0]);
}
// 1. Quebramos em formato de tabela com array_chunk
// 2. Convertemos as linhas em HTML com array_map
// 3. Unimos o HTML com implode
$table = implode(array_map('toTable', array_chunk($rows, $columns)));
$table = sprintf("<table>%s\n</table>", $table);
// Vamos ver como ficou
echo $table;
Edit:
Com PHP 5.3+ e PDO fica ainda mais resumido:
<?php
$conn = new PDO('mysql://localhost', 'root', 'root');
$sql = 'SHOW TABLES FROM mysql';
$columns = 4;
$data = $conn->query($sql)->fetchAll(PDO::FETCH_NUM);
$table = implode(array_map(function ($row) {
$row = array_map(function ($cells) {
return sprintf("\n\t\t<td>%s</td>", $cells[0]);
}, $row);
return sprintf("\n\t<tr>%s\n\t</tr>", implode($row));
}, array_chunk($data, $columns)));
$data = sprintf("<table>%s\n</table>", $table);
echo $data;Opa ..... eu até queria mesmo fazer com tableless mas como não sei muito de php nao sei nem por onde começar sei que daria para fazer uma consulta e fazer um while e assim fazer o loop com os resultados e mandar os mesmos fazer tipo um float left .... o detalhe é que não sei como fazer mesmo tenho noção mas fazer mesmo nada .... :cry: :ermm:
Pode me ajudar com isso ? com o que ja tenho de dados para a consulta ? Não sei implementar tambem não sei nada de php :blush:
Alguem ai pra ajudar que manje de PHP ?
Tá faltando fechar o resto da tabela:
</tr></table>