Hi all,
I have a multidimensional array in this format:
[php]
$array = array(
“Item set 1” => array(
“Product ID” => array(
“Name” => “a test product”
);
);
“Item set 2” => array(
“Product ID” => array(
“Name” => “a test product”
);
);
“Item set 3” => array(
“Product ID” => array(
“Name” => “a test product”
);
);
“Item set 4” => array(
“Product ID” => array(
“Name” => “a test product”
);
);
);
[/php]
Is there a way I can make it so the item set arrays merge into one big array of products? That way I can do:
[php]
foreach($array as $id => $product) {
echo "Product ID: " . $id . ’ ’ . "Product name: " . $product[‘name’];
}
[/php]
Hope this makes sense
Thanks,
Adam