I need to show some particular Row and Column of DataBase
// my query
$products = $conn->prepare("SELECT * FROM products");
$products->execute();
$row_products = $products->fetch(PDO::FETCH_ASSOC);
$totalRows_products=$products->rowCount();
This show the 1st product
echo $row_products->name;
echo $row_products->value;`
But i need to show some particular Row
I cant use DO or WHILE because it can not be sequential
Something like this, but it dont work:
My 3rd product is: <?php echo $row_products[2]->name; ?>
and my 6th product is: <?php echo $row_products[5]->name; ?>