I was recently testing something and made an interesting discovery... <cfscript> thisVar.testStruct.myVal = "some value"; </cfscript>
Actually works... without a structNew() call to create it. So... new question... do we go ahead and imply a struct simply by syntax, or do we, for the sake of protocol and readability, insist on an explicit strucNew() call? Personally, I'm for dropping the extra operation and implicity creating a struct. Anybody? Laterz, J -- Continuum Media Group LLC Burnsville, MN 55337 http://www.web-relevant.com http://cfobjective.blogspot.com On Fri, 14 Jan 2005 13:58:04 -0500, Ben Doom <[EMAIL PROTECTED]> wrote: > Associative arrays in PHP are basically the equivalent of structures in > CF. So, in CFSCRIPT... > > item = structnew(); > item.level = "level 12"; > item.ecs = "something else"; > // alternate syntax > item["dn"] = "third data"; > > and so forth. > > --Ben > > Charles Heizer wrote: > > Hello, > > If I wanted to do a multi-valued array in php I would initialize the > > array like this, how would I do this in ColdFusion? > > > > Thanks, > > - Charles > > > > PHP Example -- > > $item = array( > > 'level'=> $level, > > 'ecs' => $expanded, > > 'dn'=> $dn, > > 'rdn'=> $rdn[0], > > 'icon'=> $icon, > > ); > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190679 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54