> into an array by using the ArrayInsertAt() function:
>
> Example:
> For a 1d array:
> <cfset ArrayInsertAt(myArray, 5, "myValue")>
>
> For a 2d arary:
> <cfset ArrayInsertAt(myArray, 5, ArrayNew(1))>
> <cfset myArray[5][1] = whatever>
> <cfset myArray[5][2] = something_else>
>
> Problem is that 'ArrayInsertAt' will insert an element(s), but
> it will overwrite what is currently at that location. What I
> need to do is shift the rows of the Array down and insert a
> new row containing the new elements. This adds to the array
> content and retains the original content of the array.
According to the documentation, existing elements should automatically be
shifted up one in position, so you shouldn't be having this problem. What
version of CF are you using?
Alternatively, why not just order the data the way you want it before
building the array? Or, perhaps more importantly, why does the ordering
matter at all? Ideally, in most (but not all) situations, it shouldn't.
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]

