im trying to grab all the row values from a database column like this:
$products = mysqli_fetch_assoc(mysqli_query($con,"SELECT product_id FROM am_product"));
print_r($products);
expecting to get something like if i do this:
$products = array(1,2,3,4,5)
in the first place so i can use it in other functions. But instead i only get this: Array ( [product_id] => 1 ).
How can i get all the values and not only the first one?
Thank you.