Hi all, not sure if anyone can help out with this or not:
I've got some code that loops over an array to create some HTML that is then sent via CFMAIL:
Now in most instances, this works fine, but occasionaly and exclamation point is added to the i variable, when i = 4.
Eg - When it is working properly, Variables.Books contains:
When the mysterious problem occurs, Variables.Books contains:
It seems to be dependant on the values stored in the array that is referenced in the loop, but I can't seem to work out why it is doing this.
Any thoughts?
I've got some code that loops over an array to create some HTML that is then sent via CFMAIL:
Code:
<cfset Variables.Books = "">
<cfloop index="i" from="1" to="#BookCount#">
<cfset Variables.Books = "<b>Book Item: #i#</b><br>">
<!--- Loop over array --->
...
</cfloop>
Now in most instances, this works fine, but occasionaly and exclamation point is added to the i variable, when i = 4.
Eg - When it is working properly, Variables.Books contains:
Code:
<b>Book Item: 1</b></br>
<b>Book Item: 2</b></br>
<b>Book Item: 3</b></br>
<b>Book Item: 4</b></br>
<b>Book Item: 5</b></br>
When the mysterious problem occurs, Variables.Books contains:
Code:
<b>Book Item: 1</b></br>
<b>Book Item: 2</b></br>
<b>Book Item: 3</b></br>
<b>Book Item: 4!</b></br>
<b>Book Item: 5</b></br>
It seems to be dependant on the values stored in the array that is referenced in the loop, but I can't seem to work out why it is doing this.
Any thoughts?