How to force my loop to start from position same as array?
Hello everyone,
I'm working on my project and I have a problem looping through my array. As many of you know arrays in coldfusion start at position 1, inmy case if I put that my cfloop starts from 1 I'm getting an error because that does not match my array. Here is my sample of code:
<cfloop index="i" from="i-1" to=#(cnt)# step="1">
<cfset myrow = #replace(myarray,chr(10),'')#>
<cfset myrow = ListToArray(myrow,",",true)>
<cfoutput>
(#myrow[1]#),
(#myrow[2]#)
<br/>
</cfoutoput>
</cfloop>
Does anyone know how I can fix this problem? I tried to use array in my loop but I got another error with that option.
Thanks in advance for any advise.
