personal blog related to technology, coding and publishing.
ColdFusion hates me
So I’m working on (what I’d consider a very small) problem: I need to convert a string to an array, then loop that array and do ‘something’ to each value.
For some reason, that’s beyond my understanding, I can’t get the following code to work (I get ‘invalid com/struct’ errors):
-
<cfset MyList = "1,2,3,4">
-
<cfset MyArray = ListToArray(MyList)>
-
<cfloop collection="#MyArray#" item="i">
-
<cfoutput>#i#:#MyArray[i]#</cfoutput>
-
</cfloop>
| Print article | This entry was posted by Chad Edge on March 8, 2007 at 1:51 pm, and is filed under code, work. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
about 3 years ago
Update: Well, all’s well now. For some reason or another I got the damn thing to work.
I’ll update the code tomorrow (too sick now).