Skip to content

Instantly share code, notes, and snippets.

@ryanhanwu
Created January 29, 2019 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanhanwu/4acb5f8ac28d23cd5ab78aed2f5cb98d to your computer and use it in GitHub Desktop.
Save ryanhanwu/4acb5f8ac28d23cd5ab78aed2f5cb98d to your computer and use it in GitHub Desktop.
Asp InArray
<%
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