title: Associative array - How to display values
body: <p>I have array which looks like this:</p>
  
  <pre><code>"$companies" =&gt; array (6)
  0 =&gt; 44.0
  1 =&gt; 1399.0
  2 =&gt; 0.0
  3 =&gt; 2.0
  4 =&gt; 750.0
  12 =&gt; 0.0
  </code></pre>
  
  <p>where first number represent company ID and second number represent SUM() of one column from the table. </p>
  
  <p>I belieave you skilled guys meet with something like this milions times (not like me.)
  What i need is to create a table where each line is 1 company and in each line there are 2  where first gonna be ID and second gonna be value</p>
  
  <pre><code>                    &lt;tr n:foreach="$companies as $company"&gt;                         
                          &lt;td&gt;{$company}&lt;/td&gt;
                          &lt;td class="center"&gt;{$company[1]}&lt;/td&gt;                                                           
                      &lt;/tr&gt;
  </code></pre>
  
  <p>Problem is that, I never know how many companies there gonna be, and what ID they will have so i can't use something like <code>echo $companies[0];</code> </p>
  
  <p>How you suggest to add this to table?</p>