I have a multidimensional array with key value. I want to loop the data in that array but I don't know how.
This is my array:
$myArray= Array
(
'134' => Array
(
'1138' => Array
(
'id' => 1138,
'qty' => 1,
'price' => 4900000,
'name' => 'Pioneer AVH X5850BT Head Unit Double Din 7Inch',
'options' => Array
(
'image' => '865e6ad631fa45d408acfc6f8a8ff008.jpg',
'created_by' => 134
),
'rowid' => 'f9e62f7ce9665a25ff40848744dd83f4',
'subtotal' => 4900000
),
'1003' => Array
(
'id' => 1003,
'qty' => 1,
'price' => 2250000,
'name' => 'Steelmate SW813 Subwoofer Aktif 10 Inch',
'options' => Array
(
'image' => '962df806d5adc7bd0d22666fe996f139.jpg',
'created_by' => 134
),
'rowid' => '7aa455ef597b2906e3895783bd7a5c70',
'subtotal' => 2250000
)
),
'157' => Array
(
'2527' => Array
(
'id' => 2527,
'qty' => 1,
'price' => 2475000,
'name' => 'Rockford Fosgate P165SE Speaker Split 2way Komponen',
'options' => Array
(
'image' => '81027273a2ad59a96aec85ec66ce2704.jpg',
'created_by' => 157
),
'rowid' => 'ed9301accd0d84bd0417609aa80cebc7',
'subtotal' => 2475000
)
)
);
How do I loop / foreach that array?
I guess there is a foreach inside a foreach, but I don't know how to do that.