title: PHP Parsing Associative Array
body: <p>I have a quick question that I just can't seem to figure out even though it should be straightforward.</p>
  
  <p>I have an associative array of the following structure:</p>
  
  <pre><code> [uk] =&gt; Array
          (
              [TW] =&gt; 1588
              [LY] =&gt; 12936
              [LW] =&gt; 13643
          )
  </code></pre>
  
  <p>I am displaying it in an HTML table as follows.</p>
  
  <pre><code>foreach ($leads as $country) {
      echo '&lt;tr&gt;&lt;td&gt;' . $country . '&lt;/td&gt;&lt;td&gt;' . $country['TW'] . '&lt;/td&gt;&lt;td&gt;' . $country['LY'] . '&lt;/td&gt;&lt;td&gt;' . $country['LW'] . '&lt;/td&gt;&lt;/tr&gt;';
  }
  </code></pre>
  
  <p>but the country comes out as <code>Array</code> so I'm just wondering what I am doing wrong to get the <code>uk</code> part out.</p>
  
  <p><strong>Output</strong></p>
  
  <pre><code>Array   1588    12936   13643
  </code></pre>