I want to show my orders with Bootstrap Card, but I actually can't put all orders in separated card. I got for every row in mysql table new card. For example if I have 1 A 2 A 1 B 2 B 3 C
It will show me (1 A) (2 A) (1 B) (2 B) (3 C) but i want (1 A B) (2 A B) (3 C)
For demonstration i made screenshot from dummy values.
My code is:
<?php
$sql = 'SELECT DISTINCT(tbl_orders.uid), article from tbl_orders ';
$stmt = $conn -> prepare($sql);
$stmt->execute();
$sql1 = 'SELECT tbl_orders.article from tbl_orders GROUP BY tbl_orders.uid';
$stmt1 = $conn -> prepare($sql1);
$stmt1->execute();
?>
<?php while ($row = $stmt -> fetch ()) {
$red = $row['uid'];?>
<div class="card">
<h1><?php echo $row['uid']; ?></h1>
<h2><?php echo $row['article'];?></h2>
<h3><?php
?></h3>
</div>
<?php }?>