I want to display this using for loop [on hold]

Table or div no problem.
below example is in table :). I need solution in <table> or <div>

<table>
    <%
       for(int i=0;i<=5;i++){ %>
         <tr> 
            <% if((i==2) || (i==4){  %>
                <td> only this 1st <td> get printed </td>    
            <%   } else {   %>
               <td> **only this 2nd** <td> get printed </td>
      <% }     
    } 
     %>

I am facing jsfiddle.net/ac1t8uL6, but I want like this jsfiddle.net/njubckmg


Source: jsp

Leave a Reply