Greg's Blog

helping me remember what I figure out

Dynamic Variable Names

| Comments

I always thought you needed to use evaluate to build up dynamic variables, but nope that is not required you can simply do this:

<cfset “#arguments.str#.#key#” = variables.holder[“#key#”]>

And even better it saves a few CPU cycles and dispenses with the evaluate function.