[导入]ASP常用函数:InArray()

<%
'功能:判断一个值是否存在于数组
'来源:http://jorkin.reallydo.com/article.asp?id=462

Function InArray( sValue, aArray )
    
Dim x
    InArray = False
    For Each
x In aArray
        If x = sValue Then
            
InArray = True
            Exit For
        End If
    Next
End Function
%>

<%
'功能:判断一个值是否存在于数组
'来源:http://jorkin.reallydo.com/article.asp?id=462

Function InArray( sValue, aArray )
    
Dim i
    InArray = False
    For
i = 0 To UBound( aArray )
        
If aArray(i) = sValue Then
            
InArray = True
            Exit For
        End If
    Next
End Function
%>


文章来源: http://Jorkin.Reallydo.Com/default.asp?id=462

你可能感兴趣的:(array)