> is there a function to compare 2 arrays or lists and return
> the values that exist in both?

Not that I know of, but you could create your own.  Though I have not looked, 
but I would be very surprised if cflib.org did not already have a function for 
this

This could certainly be improved ...
<cfset list1 = "a,b,c,d,e,f,g,h,i">
<cfset list2 = "1,b,2,3,e,6,9">
<cfset shared = "">
<cfloop list="#list1#" index="elem">
        <cfif listFindNoCase(list2, elem)>
                <cfset shared = listAppend(shared, elem)>
        </cfif>
</cfloop>
<cfoutput>
        shared = #shared#<br>
</cfoutput>


      


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327229
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to