At times during coding in Coldfusion, we get stuck at places, where we need to create variables dynamically.
We may attempt with below code to create dynamic variables.
Here I am expecting to create variables as variables.employee1, variables.employee2… and assign them some values but on execution the following error is thrown
ColdFusion was looking at the following text: #
This error is also generated when the variable name ends with .(period)
So to fix this problem, we can use any of the following three ways.
1.
(As the variables are structures so we can follow above mentioned way to create dynamic variables)
2.
3.
* first assign some value to "variables.someValue" to assign it to the created dynamic variables