Howdy, Stranger!

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


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

ArnieArnie Member Posts: 155
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.


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

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

    ah okay thanks!

  • Chris BrownChris Brown USAMember Posts: 4,624 ✭✭

    __ // // free video tutorials and ebooks about ( Visual Basic, MATLAB, Delphi, Objective-C, C, Go, Visual Basic .NET, C++, JavaScript, Perl, Assembly, Java, Python, Scratch, R, PHP, PL/SQL, C#, Swift, Ruby Scheme, Clojure, COBOL, Kotlin, Julia, Awk, D, Lua, Scala, Fortran, Crystal, Alice, Apex, ABAP, VBScript, Hack, Dart, FoxPro, Bash, Transact-SQL, SAS, Ada, LabVIEW, Rust, Erlang, Logo, Lisp, F#, Prolog, ML ) _____

Sign In or Register to comment.