Giving a specific value in a for loop for an input type

lets say for example i have the following for loop:

for (int i=0; i<%= something[i] %>

which will put a 'max' number of something's one after the other with a checkbox next to each of them. how do i make it so that an individual value is associated with each something? if i put value=i that will just make the string 'i' associated with all something's, but i would rather the value be related to the numbered something. for example, if max was equal to 5, then there were be the value's 1, 2, 3, 4 and 5 asscoted with the 5 something's.


  • <%
    for (int i=0; i<max; i++)
    ><%= something[i] %>

  • : <%
    : for (int i=0; i<max; i++)
    : %>
    : ><%= something[i] %>

    ah okay thanks!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion