Hello! I have a table setting another table and I'm trying to display the same content set on the same line.
I did a while but the result looks like this:
André Cargo: Operário André Cargo: Auxiliar Julia Cargo: Secretária Julia Cargo: Auxiliar
I want you to look like this:
André Cargo: Operário e Auxiliar Julia Cargo: Secretária e Auxiliar
$sql = "select * from funcionarios join cargos on funcionarios.id = cargos.id_funcionario";
$result = mysqli_query($con, $sql);
while ($row = mysqli_fetch_array($result)) {
?>
<div class="card-stacked">
<div class="card-content">
<strong><?php echo $row['nome']; ?></strong>
<p>Cargo: <?php echo $row['cargo']; ?></p>
</div>
</div>
<?php } ?>