title: Smarty multidimensional Array
body: <p>I have a multidimensional array like this :</p>
  
  <pre><code>    $products   Smarty_Variable Object (3)
  -&gt;value = Array (2)
    0 =&gt; Array (73)
      id_product =&gt; "1"
      id_supplier =&gt; "1"
      id_manufacturer =&gt; "1"
      id_tax_rules_group =&gt; "1"
      id_category_default =&gt; "2"
      id_color_default =&gt; "2"
      on_sale =&gt; "0"
      online_only =&gt; "0"
      ean13 =&gt; "0"
      upc =&gt; null
      ecotax =&gt; "0.000000"
      quantity =&gt; "50"
      minimal_quantity =&gt; "1"
      price =&gt; 189.05
      wholesale_price =&gt; "70.000000"
      unity =&gt; null
      unit_price_ratio =&gt; "0.000000"
      additional_shipping_cost =&gt; "0.00"
      reference =&gt; ""
      supplier_reference =&gt; ""
      location =&gt; null
      width =&gt; "0"
      height =&gt; "0"
      depth =&gt; "0"
      weight =&gt; "0.5"
      out_of_stock =&gt; "2"
      quantity_discount =&gt; "0"
      customizable =&gt; "0"
      uploadable_files =&gt; "0"
      text_fields =&gt; "0"
      active =&gt; "1"
      available_for_order =&gt; "1"
      condition =&gt; "new"
      show_price =&gt; "1"
      indexed =&gt; "1"
      cache_is_pack =&gt; "0"
      cache_has_attachments =&gt; "0"
      cache_default_attribute =&gt; "31"
      date_add =&gt; "2011-12-02 17:35:57"
      date_upd =&gt; "2011-12-02 17:35:57"
      id_product_attribute =&gt; "31"
      description =&gt; "&lt;p&gt;&lt;strong&gt;&lt;span style="font-size: sm..."
      description_short =&gt; "&lt;p&gt;New design. New features. Now in 8..."
      available_now =&gt; "In stock"
      available_later =&gt; ""
      link_rewrite =&gt; "ipod-nano"
      meta_description =&gt; ""
      meta_keywords =&gt; ""
      meta_title =&gt; ""
      name =&gt; "iPod Nano"
      id_image =&gt; "1-37"
      legend =&gt; "iPod Nano"
      manufacturer_name =&gt; "Apple Computer, Inc"
      tax_name =&gt; "TVA FR 19.6%"
      rate =&gt; "19.600"
      category_default =&gt; "iPods"
      new =&gt; "1"
      orderprice =&gt; "149.0000002400000"
      attribute =&gt; Array (16)
        25 =&gt; Array (2)
          0 =&gt; Array (3)
            public_group_name =&gt; "Color"
            attribute_name =&gt; "Blue"
            id_product_attribute =&gt; "25"
          1 =&gt; Array (3)
            public_group_name =&gt; "Disk space"
            attribute_name =&gt; "16Go"
            id_product_attribute =&gt; "25"
        26 =&gt; Array (2)
          0 =&gt; Array (3)
            public_group_name =&gt; "Color"
            attribute_name =&gt; "Blue"
            id_product_attribute =&gt; "26"
          1 =&gt; Array (3)
            public_group_name =&gt; "Disk space"
            attribute_name =&gt; "8Go"
            id_product_attribute =&gt; "26"
        27 =&gt; Array (2)
          0 =&gt; Array (3)
            public_group_name =&gt; "Disk space"
            attribute_name =&gt; "16Go"
            id_product_attribute =&gt; "27"
          1 =&gt; Array (3)
            public_group_name =&gt; "Color"
            attribute_name =&gt; "Yellow"
            id_product_attribute =&gt; "27"
        28 =&gt; Array (2)
          0 =&gt; Array (3)
            public_group_name =&gt; "Disk space"
            attribute_name =&gt; "8Go"
            id_product_attribute =&gt; "28"
          1 =&gt; Array (3)
            public_group_name =&gt; "Color"
            attribute_name =&gt; "Yellow"
            id_product_attribute =&gt; "28"
        29 =&gt; Array (2)
          0 =&gt; Array (3)
            public_group_name =&gt; "Color"
            attribute_name =&gt; "Metal"
            id_product_attribute =&gt; "29"
          1 =&gt; Array (3)
            public_group_name =&gt; "Disk space"
            attribute_name =&gt; "16Go"
            id_product_attribute =&gt; "29"
        30 =&gt; Array (2)
          0 =&gt; Array (3)
            public_group_name =&gt; "Color"
            attribute_name =&gt; "Metal"
            id_product_attribute =&gt; "30"
          1 =&gt; Array (3)
            public_group_name =&gt; "Disk space"
            attribute_name =&gt; "8Go"
            id_product_attribute =&gt; "30"
        32 =&gt; Array (2)
          0 =&gt; Array (3)
            public_group_name =&gt; "Color"
            attribute_name =&gt; "Black"
            id_product_attribute =&gt; "32"
          1 =&gt; Array (3)
            public_group_name =&gt; "Disk space"
            attribute_name =&gt; "8Go"
            id_product_attribute =&gt; "32"
        33 =&gt; Array (2)
          0 =&gt; Array (3)
            public_group_name =&gt; "Color"
            attribute_name =&gt; "Orange"
            id_product_attribute =&gt; "33"
          1 =&gt; Array (3)
            public_group_name =&gt; "Disk space"
            attribute_name =&gt; "16Go"
            id_product_attribute =&gt; "33"
        34 =&gt; Array (2)
          0 =&gt; Array (3)
            public_group_name =&gt; "Color"
            attribute_name =&gt; "Orange"
            id_product_attribute =&gt; "34"
          1 =&gt; Array (3)
            public_group_name =&gt; "Disk space"
            attribute_name =&gt; "8Go"
            id_product_attribute =&gt; "34"
        35 =&gt; Array (2)
          0 =&gt; Array (3)
            public_group_name =&gt; "Color"
            attribute_name =&gt; "Pink"
            id_product_attribute =&gt; "35"
          1 =&gt; Array (3)
            public_group_name =&gt; "Disk space"
            attribute_name =&gt; "16Go"
            id_product_attribute =&gt; "35"
        36 =&gt; Array (2)
          0 =&gt; Array (3)
            public_group_name =&gt; "Color"
            attribute_name =&gt; "Pink"
            id_product_attribute =&gt; "36"
          1 =&gt; Array (3)
            public_group_name =&gt; "Disk space"
            attribute_name =&gt; "8Go"
            id_product_attribute =&gt; "36"
        39 =&gt; Array (2)
          0 =&gt; Array (3)
            public_group_name =&gt; "Color"
            attribute_name =&gt; "Green"
            id_product_attribute =&gt; "39"
          1 =&gt; Array (3)
            public_group_name =&gt; "Disk space"
            attribute_name =&gt; "16Go"
            id_product_attribute =&gt; "39"
        40 =&gt; Array (2)
          0 =&gt; Array (3)
            public_group_name =&gt; "Color"
            attribute_name =&gt; "Green"
            id_product_attribute =&gt; "40"
          1 =&gt; Array (3)
            public_group_name =&gt; "Disk space"
            attribute_name =&gt; "8Go"
            id_product_attribute =&gt; "40"
        41 =&gt; Array (2)
          0 =&gt; Array (3)
            public_group_name =&gt; "Disk space"
            attribute_name =&gt; "16Go"
            id_product_attribute =&gt; "41"
          1 =&gt; Array (3)
            public_group_name =&gt; "Color"
            attribute_name =&gt; "Purple"
            id_product_attribute =&gt; "41"
        42 =&gt; Array (2)
          0 =&gt; Array (3)
            public_group_name =&gt; "Disk space"
            attribute_name =&gt; "8Go"
            id_product_attribute =&gt; "42"
          1 =&gt; Array (3)
            public_group_name =&gt; "Color"
            attribute_name =&gt; "Purple"
            id_product_attribute =&gt; "42"
        31 =&gt; Array (2)
          0 =&gt; Array (3)
            public_group_name =&gt; "Color"
            attribute_name =&gt; "Black"
            id_product_attribute =&gt; "31"
          1 =&gt; Array (3)
            public_group_name =&gt; "Disk space"
            attribute_name =&gt; "16Go"
            id_product_attribute =&gt; "31"
  </code></pre>
  
  <p>In my tpl i have this :</p>
  
  <pre><code> {foreach from=$product.attribute key='id_attribute' item='attribute'} 
  &lt;li&gt;{$attribute}&lt;/li&gt;
  {/foreach}
  </code></pre>
  
  <p>This code return me an array.</p>
  
  <p>How can i display all the value like this :</p>
  
  <ul>
  <li>Color blue , disk space : 16Go  (array 25)</li>
  <li>Color blue, disk space : 8Go (array 26)</li>
  <li>...</li>
  </ul>
  
  <p>I have to make multiple foreach ?
  thx</p>