Created
January 29, 2019 14:16
-
-
Save ryanhanwu/4acb5f8ac28d23cd5ab78aed2f5cb98d to your computer and use it in GitHub Desktop.
Asp InArray
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% | |
Function InArray(Needle, Haystack) | |
Dim i, x | |
InArray = False | |
For i = 0 To Ubound(Haystack) | |
If IsArray(Needle) = True Then | |
For x = 0 To Ubound(Needle) | |
If Trim(Haystack(i)) = Trim(Needle(x)) Then | |
InArray = True | |
Exit Function | |
End If | |
Next | |
Else | |
If Trim(Haystack(i)) = Trim(Needle) Then | |
InArray = True | |
Exit Function | |
End If | |
End If | |
Next | |
End Function | |
%> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment