0
Hello! I have a table setting another table and I’m trying to display the same content set in the same row.
I did a while but the result is getting like this:
André Cargo: Operário André Cargo: Auxiliar Julia Cargo: Secretária Julia Cargo: Auxiliar
I want it to stay that way:
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 } ?>
Need to put your SQL or PHP code to know exactly where to move.
– rray
I put the code.
– OliverDamon