• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

problem with arrays

-problem code-
<CFLOOP index="X" from="1" to="5">
<CFSET variables["hitcount[#X#]"] = variables["hitcount[#X#]+1"]>>
</CFLOOP>

----------------------------------

Ok

Assume hitcount is a defined array - hitcount[1]

With this basic loop, I am going to increase each array element by 1

if hitcount[1] = 5
then hitcount[1] = '5 + 1'
therefore hitcount[1] = 6

It is not accepting my CFSET tag

Let's say we are on count 3 and hitcount[3]=2
I'd want the cfset tag to look like

<CFSET hitcount[3] = '3+1'>

here is how I have it written. I've tried multiple ways with no luck.

<CFSET #hitcount[#X#]# = variables["hitcount[#X#]+1"]>

Can anybody help?? im stuck
 
<CFSET hitcount[#x#] = #hitcount[#x#]# + 1>

Not sure, but with my distant CF knowledge that seems like it should work
 
Back
Top