PeteHotchkiss
Programmer
i'm going loopy !
I've got two arrays arrDevs() and myArray().
arrDevs is a 2 dimensional array ..
[1, Name1]
[2, Name2]
[3, Name3]
etc ...
myArray is a 1 dimensional array
[1,2,3,4,5,6,7,8]
I would like to loop through myArray() replacing the numbers with the appropriate 'Name'
ie,
[Name1, Name2, Name3 etc...]
I have the following...
code:------------------------------------------------------------
<% dim matchVal
for i=0 to Ubound(myArray)
Response.write("myArray loop: " & i & " value " & myArray(i) & "
"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
for j=0 to topLimit
matchVal = myArray(i)
Response.write(" "![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Response.write("j loop: " & j & " value <b>" & arrDevs(0,j) & " </b>myArray(i)=" & matchVal & "
"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
IF arrDevs(0,j) = myArray(i) THEN
Response.write("name:" & arrDevs(1,matchVal-1) & "
"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
END IF
next
Response.write("
"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
next
%>
this doesnt seem to work though. It seems that the IF statement is not evaluating myArray(i) to find a match ... any clues as to where I might be going wrong here ?
I've got two arrays arrDevs() and myArray().
arrDevs is a 2 dimensional array ..
[1, Name1]
[2, Name2]
[3, Name3]
etc ...
myArray is a 1 dimensional array
[1,2,3,4,5,6,7,8]
I would like to loop through myArray() replacing the numbers with the appropriate 'Name'
ie,
[Name1, Name2, Name3 etc...]
I have the following...
code:------------------------------------------------------------
<% dim matchVal
for i=0 to Ubound(myArray)
Response.write("myArray loop: " & i & " value " & myArray(i) & "
"
for j=0 to topLimit
matchVal = myArray(i)
Response.write(" "
Response.write("j loop: " & j & " value <b>" & arrDevs(0,j) & " </b>myArray(i)=" & matchVal & "
"
IF arrDevs(0,j) = myArray(i) THEN
Response.write("name:" & arrDevs(1,matchVal-1) & "
"
END IF
next
Response.write("
"
next
%>
this doesnt seem to work though. It seems that the IF statement is not evaluating myArray(i) to find a match ... any clues as to where I might be going wrong here ?