[thelist] cf structures

Matt Liotta mliotta at r337.com
Wed May 1 23:59:12 CDT 2002


There are several ways to do this. You can use struct functions, dot
notation, or bracket notation. Here is an example of all of them.

<cfscript>
	animals = StructNew();
	animals.dogs = StructNew();
	animals.dogs["Bessie"] = StructNew();
	StructInsert(animals["dogs"].bessie, "sex", "female");
</cfscript>

-Matt

> -----Original Message-----
> From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]
> On Behalf Of Erik Mattheis
> Sent: Wednesday, May 01, 2002 5:12 PM
> To: thelist at lists.evolt.org
> Subject: [thelist] cf structures
>
> I'm trying to figure out how to create a CF structure like
>
> animals.dogs.bessie.sex
>
> and store 'female' in that node.
>
> ... and can't find anything in the documentation or in a quick google
> search ... do you _have_ to say
>
> animals=StructNew()
> StructInsert(animals,'dogs',StructNew())
> StructInsert(animals.dogs,'bessie',StructNew())
> StructInsert(animals.dogs.bessie,'sex','female')
>
> Maybe I don't even want a structure, but it seems like it would be
> the best thing ... I need to create a multi-dimentional array type
> deal that can be populated by a query, form, cookie or url or
> combination of any of those.
> --
>
> __________________________________________
> - Erik Mattheis
>
> (612) 377 2272
> http://goZz.com/
>
> Through June 15
> 9am - 3pm M-F:
> (952) 838 7698
>
> __________________________________________
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !




More information about the thelist mailing list