-2
I tested this code I found, is the index, in it I display products from my bank, only the image that is the same (repeats in each div) because I do not get it from the bank, I think if I took the image as I took the price and the name of the database would solve, but how can I do this, please?
<div class="container">
        <div class="row">
            <?php foreach($products as $product) : ?>
                <div class="col-4">
                    <div class="card">
                        <div class="card-body">             
                            <img src="img/produtos/buque-dia-radiante.jpg" alt="" />
                             <h4 class="card-title"><?php echo $product['nome']?></h4>
                             <h6 class="card-subtitle mb-2 text-muted">
                                R$<?php echo number_format($product['preco'], 2, ',', '.')?>
                             </h6>
                             <a class="btn btn-primary" href="carrinho.php?acao=add&id=<?php echo $product['id']?>" class="card-link">Comprar</a>
                        </div>
                    </div>
                </div>
            <?php endforeach;?>
        </div>
    </div>