Searching ASP Arrays
Hi,
Its good to have p2p back at last.....Ive got a problem with arrays, ive never really needed to use them before. Ive got an array that holds a list of ID's from a database which is populated using the following script.....
Dim counter
counter = 0
Dim arrBuddies()
ReDim arrBuddies(Cint(rsBuddies.RecordCount))
While Not rsBuddies.Eof
arrBuddies(counter) = rsBuddies("UserIDBuddy")
Response.Write(arrBuddies(counter) & "<br>")
counter = counter + 1
rsBuddies.MoveNext
Wend
rsBuddies.ReQuery
This code works fine, however what i need to be able to do is to search the array for a particular ID and return a value if the ID already exists in the array.
Does anyone know how to do this???
Thanks in advance
Al Higgs
|