<cfloop from="1" to="#ArrayLen(listOne)#" step="1" index="i">
    <cfset itemFound = 0>
    <cfloop from="1" to="#ArrayLen(listTwo)#" step="1" index="j">
        <cfif listOne[i] eq listTwo[j]>
            <cfset itemFound = 1>
        </cfif>
    </cfloop>
    <cfif NOT itemFound>
        <cfset ArrayAppend(listThree,listOne[i])>
    </cfif>
</cfloop>

Jake Churchill
CF Webtools
11204 Davenport, Ste. 100
Omaha, NE  68154
http://www.cfwebtools.com
402-408-3733 x103



BazD wrote:
> Hi folks
>
> Im trying to do some stuff to an old farcry 3 custom admin tool that I
> did a while back.
>
> Basically, Ive got 2 x 1 dimensional arrays - lets call them
> "listOne", and "listTwo"
>
> listOne has about 1000 names inside
> listTwo has a selection of 200 of those 1000 names
>
> What Im trying to do is compare the two arrays, and create a 3rd array
> "listThree" which is basically the result of removing items in listTwo
> from listOne
>
> To illustrate:
>
> listOne = "andy, bob, jim, craig, steven"
> listTwo = "bob,jim"
>
> listThree ="andy,craig,steven"
>
> Any idea on how I can go about doing this ?
>
> Ive tried looping through and all sorts, but just havnt hacked it yet
> (its monday,and Im still recovering from weekend celebrations!)
>
> Thanks in advance
> >
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"farcry-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/farcry-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to