ArrayToList will only accept a single dimensional array, not a two dimensional array as you have it. This only makes sense: what would ArrayToList() return for multidimensional arays? I'm not sure why you're even doing this: listLen(arrayToList(session.cart)) There's really no need considering the ArrayLen() function. ;^) Jim Davis -----Original Message----- From: Tony Weeg [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 12:32 AM To: CF-Talk Subject: array question The array passed cannot contain more than one dimension. what does this crap mean? here is the code below ... thanks! <cfif isDefined("url.productId") or isDefined("session.cart")> <cfif isDefined("session.cart") and isArray(session.cart)> <cfset cartLength = listLen(arrayToList(session.cart))> <cfset arrayPosition = #cartLength# + 1> <cfset #session.cart[arrayPosition][1]# = "#url.productId#"> <cfset #session.cart[arrayPosition][2]# = "115"> <cfelse> <cfset session.cart = arrayNew(2)> <cfset session.cart[1][1] = "#url.productId#"> <cfset session.cart[1][2] = "115"> </cfif> <cfset cartLength = listLen(arrayToList(session.cart))> <cfoutput>#cartLength#</cfoutput> <cfabort> <cfloop from = "1" to = "#cartLength#" index = "i"> <cfoutput> #session.cart[i][1]# (#session.cart[i][2]#) </cfoutput> Please Click here to Continue Shopping </cfloop> <cfelse> Please click here to continue shopping. There is nothing in your cart! </cfif> ....tony tony weeg [EMAIL PROTECTED] www.revolutionwebdesign.com rEvOlUtIoN wEb DeSiGn 410.334.6331 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to