For example. If I had the following array:
Dim ar As Integer ar=array(5,6,4,7,3,8,2,9,1,0)
and I was looking for 3, I would want a function to return the value 4.
Or, if I was looking for 6, I'd want it to return the value 1.
Is there a built in function that can do this, or do I have to write a simple FOR EACH loop and do it manually. I know in some languages like PHP they have such functions array_search($needle, $haystack).