title: Print Array to table
body: <p>I have an array with data and I have to put them into a table.
  Array:</p>
  
  <pre><code>array(
   0=&gt;1
   1=&gt;Jon
   2=&gt;jon@email.com
   3=&gt;2
   4=&gt;Doe
   5=&gt;doe@email.com
   6=&gt;3
   7=&gt;Foo
   8=&gt;foo@email.com)
  </code></pre>
  
  <p>So Table head is:</p>
  
  <pre><code>&lt;table&gt;
      &lt;head&gt;
         &lt;tr&gt;
           &lt;th&gt;ID&lt;/th&gt;
           &lt;th&gt;Name&lt;/th&gt;
           &lt;th&gt;Email&lt;/th&gt;
         &lt;/tr&gt;
      &lt;/thead&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>If I go and loop through the array:</p>
  
  <pre><code> &lt;table&gt;
      &lt;thead&gt;
         &lt;tr&gt;
           &lt;th&gt;ID&lt;/th&gt;
           &lt;th&gt;Name&lt;/th&gt;
           &lt;th&gt;Email&lt;/th&gt;
         &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
         @foreach($array as $data)
             &lt;tr&gt;
               &lt;td&gt;
                 {{$data}}
               &lt;/td&gt;
             &lt;/tr&gt; 
         @endforeach
      &lt;tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Current Output:</p>
  
  <pre><code>Id   Name  Email
  1   Jon  jon@email.com 2 Doe doe@email.com  3  Foo foo@email.com
  </code></pre>
  
  <p>But My desired output is:</p>
  
  <pre><code>Id   Name  Email
   1   Jon   jon@email.com
   2   Doe   doe@email.com
   3   Foo   foo@email.com
  </code></pre>
  
  <p>I tried to chunk array into arrays with array_chunk() but the result was the same.</p>
  
  <p>I am on laravel but I can go with plain php also.
  Any tips would be much apreciated.</p>