title: HTML - formatting a vertical table
body: <p>I have a table that looks like this:</p>
  
  <pre><code>HEADER1: data1
  HEADER2: data2
  HEADER3: data3
  HEADER4: data4
  HEADER5: data5
  HEADER6: data6
  HEADER7: data7
  HEADER8: data8
  </code></pre>
  
  <p>and so on. I want to set a certain "threshold", say 4, after which the data will switch to looking like this (so that the user doesn't have to scroll down too much):</p>
  
  <pre><code>HEADER1: data1      HEADER5: data5
  HEADER2: data2      HEADER6: data6
  HEADER3: data3      HEADER7: data7
  HEADER4: data4      HEADER8: data8
  </code></pre>
  
  <p>How do I do such a thing in the simplest possible way? </p>
  
  <p>Here is the current PHP code I use to generate this table:</p>
  
  <pre><code>foreach($row as $key=&gt;$value) {
      echo '&lt;tr&gt;';
      echo '&lt;th&gt;', $headerindeces[$i], "&lt;/th&gt;";
      echo '&lt;td&gt;',$value,'&lt;/td&gt;';
      echo '&lt;/tr&gt;';
      $i++;
  }
  </code></pre>