3
I need you to help me create a php function that lists multiple tables in a row with multiple columns, depending on the amount of records in the database and the spacing of the tables defined by <div class="span">
That’s my job, but she’s just listing in multiple lines with a single column:
<?php
require 'conexao.php';
$result = mysqli_query($con, 'select * from homem_classic');
?>
<?php $titulo ="Homem Clássico";
include 'includes/header.php';
include 'includes/footer.php';
?>
<!DOCTYPE html>
<html lang="pt-PT">
<head>
<meta charset="UTF-8">
</head>
<body>
<div class="row-fluid">
<div class="span3">
<div class="imagens">
<table class="tabela">
<?php while ($product=mysqli_fetch_object($result)) { ?>
<tr>
<td><img src="<?php echo $product->imagem; ?>" alt=""></td>
</tr>
<tr>
<td><?php echo $product->nome; ?></td>
</tr>
<tr>
<td><?php echo $product->descricao; ?></td>
</tr>
<tr>
<td>
<p><a class="btn btn-info" href="cart.php?id=<?php echo $product->id; ?>"><?php echo $product->preco; ?><i class="icon-shopping-cart"></i></a></p>
</td>
</tr>
<?php } ?>
</table>
</div>
</div>
</div>
</body>
</html>
Put the php part too, how to fetch the data?
– Miguel