> examples of how to go about inserting two associated elements
> between two other associated elements arrays.
>
> Example:
>
> [first][1] + [first][2]
> [second][1] + [second][2]
>
> [first][1] + [first][2]
> [NewElement][1] + [NewElement][2]
> [second][1] + [second][2]
Something like this might work:
<cfset My2DArray = ArrayNew(2)>
<cfset My2DArray[1][1] = "outer 1 inner 1">
<cfset My2DArray[1][2] = "outer 1 inner 2">
<cfset My2DArray[2][1] = "outer 2 inner 1">
<cfset My2DArray[2][2] = "outer 2 inner 2">
<cfset NewElement = ArrayNew(1)>
<cfset NewElement[1] = "foo">
<cfset NewElement[2] = "bar">
<cfset rs = ArrayInsertAt(My2DArray, 2, NewElement)>
Note that I haven't tested this, exactly, but something close to this should
work. You could also create the element in place, then populate it, I
suspect.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

