Looping an array
I'm trying to loop an array inside another loop and am running into an issue. The problem is that the inside loop works but it is looping the outisde loop x number of times
This is where the code is so far. Any ideas what i'm doing wrong?
<cfset myList = ValueList(AccountProducts.PID)>
<cfset myList = listtoarray(myList)>
<CFLOOP QUERY="GetProductList">
<CFLOOP index="VPU" from="1" to="#ArrayLen(myList)#">
<CFIF PID EQ #myList[VPU]#>
<CFINPUT NAME="SKUName" TYPE="checkbox" VALUE="#PID#" CHECKED="Yes" />#SKUName# <br />
<CFELSE>
<CFINPUT NAME="SKUName" TYPE="checkbox" VALUE="#PID#" CHECKED="NO" />#SKUName# <br />
</CFIF>
</CFLOOP>
</CFLOOP>
so an example of what it is doing now is
Product 1
Product 1
Product 1
Product 2
Product 2
Product 2
Product 3
Product 3
Product 3
