I am trying to display my database result randomly as user visit page or refresh see my code below
$result = $food->itemsList();
$count=0;
while ($item = $result->fetch_assoc()) {
if ($count == 0) {
echo "<div class='row'>";
}
?>
<div class="col-lg-3 col-md-4 col-sm-6 col-xs-12 mb-3 food-item">
<form method="post" action="cart.php?action=add&id=<?php echo $item["id"]; ?>">
<input type="hidden" name="status" value="<?php echo $item["status"]; ?>">
<input type="hidden" name="item_name" value="<?php echo $item["name"]; ?>">
<input type="hidden" name="item_price" value="<?php echo $item["price"]; ?>">
<input type="hidden" name="description" value="<?php echo $item["description"]; ?>">
<input type="hidden" name="item_id" value="<?php echo $item["id"]; ?>">
<input type="hidden" name="vendor_name" value="<?php echo $item["vendor_name"]; ?>">
<input type="hidden" name="vendor_address" value="<?php echo $item["vendor_address"]; ?>">
<input type="hidden" name="images" value="<?php echo $item["images"]; ?>">
<div class="card rounded-0" align="center"; style="background-color:#0a386e;">
<div class="food-img-holder position-relative overflow-hidden" style="z-index:1;">
<img src="<?php echo $item["images"]; ?>" class="img-top">
</div>
Thanks I appreciate your help.