[thelist] What is the ColdFusion equivalent to eval()?
Lindsay Evans
lindsay at NOSPAMredsquare.com.au
Tue Apr 24 00:33:15 CDT 2001
> In JavaScript and php we can use eval() to
> do this, but how can I do it in ColdFusion?
Evaluate()
> Also, is the #i# used in the ListToArray function
> correct?
umm, I don't think so, ListToArray() has to have a list as the first
argument, what your are passing there will be the string "my_arr[x]" (where
x is whatever value i is in the loop)
If you are trying to do what I think you're doing, then you need
ListToArray(my_arr[i], "-")
hth
--
Lindsay Evans.
Production Artist/Coder,
Red Square Productions.
vox: 8596.4000
fax: 8596.4001
web: www.redsquare.com.au
-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of jon steele
Sent: Tuesday, April 24, 2001 3:06 PM
To: thelist at lists.evolt.org
Subject: [thelist] What is the ColdFusion equivalent to eval()?
Hello,
In ColdFusion, I have a loop which creates variables.
Now I want to use the counter (i) in my variable
names, to create variable myvar_1, myvar_2, myvar_3,
and so on. In JavaScript and php we can use eval() to
do this, but how can I do it in ColdFusion? This is
what I have so far:
<cfloop index="i" from="1" to="#ArrayLen("my_arr")#">
<cfset order_#id# = ListToArray("my_arr[#i#]","-")>
</cfloop>
Also, is the #i# used in the ListToArray function
correct?
http://lists.evolt.org Workers of the Web, evolt !
More information about the thelist
mailing list