How can I pull a single element from an array inside a function.
example:
dim varArr
varArr = Array (var1,var2,var3)
function getArr(arrNum)
dim i
i = LBound(varArr) to UBound(varArr)
next
arrNum = varArr(i)
getArr = arrNum
end function
response.write(getArr(1))
display should " be var2 "
the code is definatley wrong but would like to know how to do this.
Thanks
example:
dim varArr
varArr = Array (var1,var2,var3)
function getArr(arrNum)
dim i
i = LBound(varArr) to UBound(varArr)
next
arrNum = varArr(i)
getArr = arrNum
end function
response.write(getArr(1))
display should " be var2 "
the code is definatley wrong but would like to know how to do this.
Thanks