David Moore, Jr. wrote:
> What is the [] for. How would they be used. 

That is called 'Array Notation'.  All ColdFusion variables are now 
structures AKA 'Associative Array' or 'Hash' or many other names.  But 
it means that you can dynamically reference the elements of complex 
variables by using the square brackets eliminating 99.78% the need to 
use evaluate.

form[fieldName] is the same as evaluate('form.#fieldName#')

This is also very useful when there are illegal variable names 
involved.  This sometimes happens with forms, but is not uncommon with 
more complex XML structures.

I.E. #form.my field# is illegal if rather unlikely.  But it could be 
achieved with #form["my field"]#.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312312
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to