Multidimensional Arrays
Posted: Sun Aug 21, 2011 2:58 pm
Hi,
I have an array that I'm having trouble with. Below is how Im accessing it and the dump output
I'm trying to assing 11880 to a product_id and the value of qty to variables. And the same with 9132... How can I loop through this array and store these values?
I don't have much experence with Multidimensional Arrays and any help is much appreciated.
I have an array that I'm having trouble with. Below is how Im accessing it and the dump output
Code: Select all
$cart = $_SESSION['cart']->contents;
var_dump($cart);
array(2) { [11880]=> array(1) { ["qty"]=> string(1) "1" } [9132]=> array(1) { ["qty"]=> float(2) } }
I don't have much experence with Multidimensional Arrays and any help is much appreciated.