strARR1 = "5,10,15,20,25,30"

# Thread: strARR1 = "5,10,15,20,25,30"

1. Senior Member
Join Date
Dec 1969
Posts
181

## strARR1 = "5,10,15,20,25,30"

Hi i got a problem<BR>when i post the number (5,10)<BR>are found . <BR>And i want to count them in a variable "(2) numbers where found"<BR><BR>How do i do that?<BR> <BR> <BR><BR>strARR1 = "5,10,15,20,25,30"<BR>strARR2 = "5,6,7,8,9,10"<BR><BR>Dim ARR1, ARR2<BR> <BR> <BR><BR>&#039;------------------------------------------------------------------<BR>&#039;these two lines output lists for user to see during comparisons<BR>&#039;------------------------------------------------------------------<BR> <BR> <BR><BR>response.Write("ARR1= (" & strARR1 & ")<BR>")<BR>response.Write("ARR2= (" & strARR2 & ")<BR>")<BR> <BR> <BR><BR>&#039;------------------------------------------------------------------<BR>&#039;Convert lists into arrays<BR>&#039;------------------------------------------------------------------<BR> <BR> <BR><BR>ARR1 = split(strARR1,",")<BR>ARR2 = split(strARR2,",")<BR> <BR> <BR><BR>&#039;------------------------------------------------------------------<BR>&#039;Compare arrays and find values common to both<BR>&#039;------------------------------------------------------------------<BR> <BR> <BR><BR>If request("buttonchoice") = "common" then<BR> strOutput = "("<BR> for i = 0 to ubound(ARR1)<BR> for j = 0 to ubound(ARR2)<BR> <BR> if ARR1(i)=ARR2(j) then strOutput=strOutput & ARR1(i) & "," <BR> next<BR><BR> next<BR><BR> strOutput = Left(strOutput, Len(strOutput)-1)<BR> strOutput = strOutput & ")"<BR><BR>end if

2. Senior Member
Join Date
Dec 1969
Posts
570

## CROSSPOST (check in adv. asp)

.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•