View Full Version : in array function
12-16-2006, 07:57 PM
can someone help me with how I would create a function that would take in an array and a value and check if that value exists in the array?
12-16-2006, 08:04 PM
Just off the top of my head:
Function inArray(byref array, byval data)
Dim found, arraylen, x
found = false
arraylen = ubound(array)
for x = 0 to arraylen
If array(x) = data Then
found = true
inArray = found
I haven't tested it but that the gist of what you'd have to do.
sorry...thought it was a PHP question.
12-18-2006, 03:10 PM
Here is another example
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.