How to store data from MySQL to a multidimensional array in PHP? This ini My database My database
I want to store every this database to multidimensional array like this
tId = array('Bid'=>'Brg', 'Bid'=>'Brg', 'Bid'=>'Brg');
i have this this code but its doesnt work
$this->db->query($query);
$transactions = array();
while($row=$this->db->fetchAll()){
$transactionId = $row['id'];
$productId = $row['produk_id'];
$product = $row['produk'];
$transactions[$transactionId]=array($productId, $product);
}