-1

I have this block that prints some description and some product details.

<?php foreach ($_additional as $_data): ?>
  <tr>
    <th class="label"><?php echo $this->htmlEscape($this->__($_data['label'])) ?></th>
    <td class="data"><?php echo $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?></td>
  </tr>
<?php endforeach; ?>

I want to turn this into printing the description and only a number of product details so what I did is this

<?php
  for ($i = 0; $i <=4; $i++) {
    print_r($_additional[$i]);
  }
?>

This prints only the description though. How can I also print the product details?

Thank you

4

1 回答 1

2

您可以访问阵列的详细信息

<?php for ($i = 0; $i <=4; $i++) {
  echo $_additional[$i]['label'];
  echo $_helper->productAttribute($_product, $_additional[$i]['value'], $_additional[$i]['code']);
}
于 2013-07-22T14:37:42.660 回答