Hi
Is it possible to return an array from a function? I tryed this but that didn't work.
Regards
Is it possible to return an array from a function? I tryed this but that didn't work.
Code:
<%
Function MakeArray()
Dim arrMyArray(3,1)
arrMyArray(0,0) = "Car no 1"
arrMyArray(0,1) = 10
arrMyArray(1,0) = "Car no 2"
arrMyArray(1,1) = 5
arrMyArray(2,0) = "Car no 3"
arrMyArray(2,1) = 8
arrMyArray(3,0) = "Car no 4"
arrMyArray(3,1) = 2
MakeArray = arrMyArray()
End Function
Dim MyArray()
MyArray = MakeArray()
For i = LBound(MyArray) to UBound(MyArray)
Response.Write ("Model: " & MyArray(i, 0) & " , Qty ")
Response.Write MyArray(i, 1) & "<BR>"
Next
%>
Regards