title: Foreach loop for tables in MVC4
body: <p>I am doing my project in MVC4 using c#. I have an IEnumerable list in my model. I use the following loop to list that in my view.</p>
  
  <pre><code>       &lt;table id="memberlist"&gt;
         &lt;tbody&gt;
          @foreach(var item in Model)
           {
            &lt;tr&gt;
               &lt;td&gt;Rtn. @item.Mem_NA&lt;br /&gt;(@item.Mem_Occ)&lt;/td&gt;
            &lt;/tr&gt;
           }
         &lt;/tbody&gt;
         &lt;/table&gt;
  </code></pre>
  
  <p>Actually i want the output like in the following table</p>
  
  <pre><code> &lt;table id="memberlist"&gt;
         &lt;tbody&gt;
            &lt;tr&gt;
               &lt;td&gt;Rtn.item.Mem_NA1&lt;br /&gt;(item.Mem_Occ1)&lt;/td&gt;
               &lt;td&gt;Rtn.item.Mem_NA2&lt;br /&gt;(item.Mem_Occ2)&lt;/td&gt;
               &lt;td&gt;Rtn.item.Mem_NA3&lt;br /&gt;(item.Mem_Occ3)&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
               &lt;td&gt;Rtn.item.Mem_NA4&lt;br /&gt;(item.Mem_Occ4)&lt;/td&gt;
               &lt;td&gt;Rtn.item.Mem_NA5&lt;br /&gt;(item.Mem_Occ5)&lt;/td&gt;
               &lt;td&gt;Rtn.item.Mem_NA6&lt;br /&gt;(item.Mem_Occ6)&lt;/td&gt;
            &lt;/tr&gt;
         &lt;/tbody&gt;
         &lt;/table&gt;
  </code></pre>
  
  <p>Is that possible for generating a table like above using a foreach loop. or is better using the div instead of table. Please help me</p>