Tabelas Dinamicas com PHP

Olá! Estou com a seguinte duvida. Suponhamos que tenho uma tabela em mysql com os seguintes dados:
dado1
dado2
dado3
dado4
Gostaria de mostrar esses dados estilo e-commerce, deste jeito em uma pagina html:
dado1 dado2
dado3 dado4
só consigo mostrar desta forma:
dado1
dado2
dado3
dado4
mas deste jeito eu não quero!
e por ai vai… alguem pode me ajudar? Não acho nada explicando de jeito nenhum na internet!
Abraços!
Resposta:
 
Codigo base para se usar dentro do while que gera a tabela:
<table style=”text-align: left; width: 444px; height: 77px;” border=”1″ cellpadding=”2″ cellspacing=”2″>
<tbody>
<tr>
<th style=”height: 40px;”>Nome</th>
<th style=”height: 40px;”>Endere&ccedil;o</th>
</tr>
<?php
while($data = mysql_fetch_array($result)) {
if($coluna == “1” || $coluna == “”) { //COLUNA1 LINHA 1N
echo “<tr>
<td style=\”height: 40px;\”>$dado1</td>”;
$n++;
$coluna = “2”;
}else if($coluna == “2”) { // COLUNA 2 LINHA 1N
echo “<td style=\”height: 40px;\”>$dado1</td>
</tr>
<tr>”;
$n++;
$coluna = “1”;
} //fim do else
} //fim do while
?>
</tbody>
</table>
 
 
$selec_dados=mysql_query(“select * from projetos ORDER BY id’ DESC”);
$i=1;
?>
<table>
<tr>
<?
while($x=mysql_fetch_array($selec_dados) ) {
echo “<td>$saida</td>”;
if( $i%2 == 0 ) {
echo “</tr><tr>”;
}
$i++;
}
?>
</tr>
</table>
 
 
Link da Matéria: http://www.vivaolinux.com.br/topico/PHP/Tabelas-dinamicas
http://www.hardware.com.br/comunidade/tabela-gerando/926215/