这是我的数组
<%
Dim myFixedArray
myFixedArray(0) = "Albert Einstein"
myFixedArray(1) = "Mother Teresa"
myFixedArray(2) = "Bill Gates"
myFixedArray(3) = "Martin Luther King Jr."
%>
现在我用来获取价值是
<%
For i=0 to 3
response.write myArray(i) & "<br>"
Next
%>
我需要拿“比尔盖茨”数组编号
我需要resut是“2”
如何在循环中找到结果?
答案 0 :(得分:1)
这个怎么样?
<%
For i=0 to 3
If myArray(i) = "Bill Gates" Then
mynumber = i (or return i)
End If
Next
%>