Hi Team
I want to reduce div card size, so that each div card will have its own div card as in a row 4. Then another row have div card with details 4. Currently their images and div card are fillng up the whole page as list.
// php code
// Display the products
$stmt = $pdo->query("SELECT * FROM products");
$products = $stmt->fetchAll(PDO::FETCH_ASSOC);
foreach ($products as $product) {
$productID = $product['id'];
$productName = $product['product_name'];
$productPrice = $product['product_price'];
$productImage = $product['product_image'];
// Start a Bootstrap card i neeed to reduce them here on div card.
echo "
$productName
Price: $productPrice
";1 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Mohamed Azarudeen ZPosted Jun 12, 2023, 4:22 PM
Try this