access_asp thread: Array Join
Message #1 by "ANTONIO JONES" <ajjones13@m...> on Thu, 2 May 2002 21:40:44
|
|
One array with two items ID, Product Name
14,Classic Chef Salad
56,Caesar salad
78,Chicken salad
Then an array that captures the quantities of each, say
3, 9, 6
How do I join them so it
looks like
14,Classic Chef Salad, 3
56,Caesar salad, 9
78,Chicken salad, 6
Message #2 by "Ken Schaefer" <ken@a...> on Wed, 8 May 2002 15:50:49 +1000
|
|
<%
If UBound(arrFirstArray, 1) = UBound(arrSecondArray) then
For i = 0 to UBound(arrFirstArray, 1)
arrFirstArray(i, 2) = arrSecondArray(i)
Next
Else
Response.Write("Houston, we have a problem!")
End If
%>
Cheers
Ken
PS What does this have to do with Access and ASP?!?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "ANTONIO JONES" <ajjones13@m...>
Subject: [access_asp] Array Join
: One array with two items ID, Product Name
: 14,Classic Chef Salad
: 56,Caesar salad
: 78,Chicken salad
:
: Then an array that captures the quantities of each, say
: 3, 9, 6
:
: How do I join them so it
: looks like
:
: 14,Classic Chef Salad, 3
: 56,Caesar salad, 9
: 78,Chicken salad, 6
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #3 by "Santhi" <santhi_maadhaven@y...> on Mon, 13 May 2002 13:10:50
|
|
Hi,
This is the code
<%
dim fir
dim sec
fir=Array("13,a","12,b","11,c")
sec=Array("3","4","5")
if (ubound(fir)=ubound(sec)) then
for i=lbound(fir) to Ubound(fir)
fir(i)=fir(i)&","&sec(i)
Response.Write fir(i)
Response.Write "<br>"
Next
else
Response.Write "Array size doesn't match"
end if
%>
rgds,
santhi
|