I have this to print values from an array.
<?php foreach ($product->data['attributes'] as $attribute => $option) {
echo '<li>'. t('@attribute: @options', array('@attribute' => $attribute, '@options' => implode(', ', (array)$option))) .'</li>';
} ?>
The code above prints everything from the attributes array:
[products] => Array
(
[0] => stdClass Object
(
[data] => Array
(
[attributes] => Array
(
[Duration] => Array
(
[4] => 2 Years
)
[Anchor Text] => Array
(
[0] => asdf
)
[URL] => Array
(
[0] => asdddddd
)
[Feed ID] => Array
(
[0] => 32845898
)
)
)
)
)
I only want to print the [URL] and [Feed ID]…
Update:
It looks like the values of your individual “attributes” are, themselves, arrays.
Try the following instead (it combines all the values of the array, separated with commas).