Thanks to all who responded. Put this one away for a day and--after trying some remarkably complicated solutions--I realized how easy it was to solve. I ended up doing the following:

<CFSET numberofgreenvegetables=0>
<CFLOOP INDEX="loopcount" From="1" To="#ArrayLen(session.cart)#">

<cfif #session.cart[loopcount][3]# is 'green'>

<CFSET numberofgreenvegetables=numberofgreenvegetables+session.cart[loopcount][2]>
</cfif>
</cfloop>

<cfoutput>
total number of green vegetables: #numberofgreenvegetables#</cfoutput>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to