title: PHP foreach nested table
body: <pre><code>&lt;table style="width: 600px" class="slicedTable"&gt;
       &lt;tr&gt;
        &lt;th&gt;Spetsialist&lt;/th&gt;
        &lt;th&gt;Tunnid&lt;/th&gt;
       &lt;/tr&gt;
  
  
  &lt;tr&gt;            
         &lt;?php foreach($specs as $specName =&gt; $spec): ?&gt;
          &lt;td&gt;&lt;?php echo $specName?&gt;
          &lt;tr&gt;
         &lt;?php endforeach; ?&gt;
  
  
  &lt;td&gt;
          &lt;?php foreach($tunnid as $tund): ?&gt;
             &lt;td&gt;&lt;?php echo $tund?&gt;&lt;/td&gt;
  
         &lt;/td&gt;
         &lt;?php endforeach; ?&gt;
       &lt;/tr&gt;
   &lt;/table&gt;
  </code></pre>
  
  <p>I need this to print out a regular table where it goes like:
  <br/>name 1 - value1
  <br/> name2 - value2</p>
  
  <p>Specs:</p>
  
  <pre><code>$specs = array();
  
              foreach($data as $row) {
                  $workerName = $row['Worker']['name'];
                  if (!isset($specs[$workerName])) {
                      $specs[$workerName] = array('procs' =&gt; array(), 'extras' =&gt; array());
                  }
  </code></pre>
  
  <p>However I can't seem to accomplish this, help please.</p>