• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Name

StructInsert

Synopsis

                     StructInsert(structure, key, value [, allowoverwrite])

Inserts key and value into structure. Returns Yes if the operation is successful and No if it isn’t. Setting the optional allowoverwrite parameter to true allows overwriting of existing keys. The default is false. Here’s an example that inserts key/value pairs into a structure called Employee:

<cfset Employee=StructNew( )>
<cfset StructInsert(Employee, "Name", "Pere Money")>
<cfset StructInsert(Employee, "Title", "President")>
<cfset StructInsert(Employee, "Department", "Executive Management")>
<cfset StructInsert(Employee, "Email", "pmoney@example.com")>
<cfset StructInsert(Employee, "PhoneExt", "1234")>
   
<cfdump var="#Employee#">


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint