$stmt = $db->get_products();
$products = array();
foreach($stmt as $items){
$products = array('asin'=>$items['asin']);
}
print_r($products);
Assuming my $stmt contains 4 values from my database, my problem is that I only get the first data in my print_r, not all the data from my database. But when I echo inside the foreach it displays the expected output but when passing it to an array it only contains one value.