hello
i am looking for a boolean function to be used like this:
[code=vb]if InArray(val,arr ()) then
' some code to run if the value "val" exists in one of the posts of the array "arr"
else
' some code to run if it doesn't
end if[/code]
i guess i could write my own function where i loop through the array and look for the value, and if found i return true - but then i'd have to write a new version for each type i want to use (i.e. one for file arrays, one for string arrays etc.) is there a more efficient way?
i am looking for a boolean function to be used like this:
[code=vb]if InArray(val,arr ()) then
' some code to run if the value "val" exists in one of the posts of the array "arr"
else
' some code to run if it doesn't
end if[/code]
i guess i could write my own function where i loop through the array and look for the value, and if found i return true - but then i'd have to write a new version for each type i want to use (i.e. one for file arrays, one for string arrays etc.) is there a more efficient way?
Comment