I read through the emails but I am not quite understanding what you are
trying to accomplish..
You have a data set like...
locationID cityName
1 AAA
2 AA
3 BB
You want to take the above and populate into an array and put some spaces
between
A and B sorted? You already have the data sorted from the database..
You can loop through the resultset alphabetically and create a 2D Array,
where each
position only contains the first Aphabet.
<cfset my2DArray = arrayNew(2)>
my2DArray[1] = will contain all "A" Starting cityNames or whatever"
my2DArray[2][1] = "SPACE" // IS THIS WHAT YOU WANT?
my2DArray[3] = will contain all "B" Starting cityNames or whatever"
You can simply create a list like
myList = "A, ,B...;
loop over the list and populate your 2 Array
HTH
Joe Eugene
-----Original Message-----
From: DougF [mailto:[EMAIL PROTECTED]
Sent: Monday, November 17, 2003 7:29 PM
To: CF-Talk
Subject: Re: Inserting rows into a 2d array
Thanks Dave.
Not having much knowledge of CF arrays I'd be interested in 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]
-Doug
----- Original Message -----
From: "Dave Watts" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, November 17, 2003 3:36 PM
Subject: RE: Inserting rows into a 2d array
> > The Macromedia documentation skilfully avoids mentioning the
> > manipulation of multi-dimensioned arrays. It seems that you
> > can create multi-dimensional arrays but can not manipulate
> > them (like you can with one dimension arrays). Going to take
> > another look at manipulating with the display logic... sigh.
>
> Sure, you can manipulate multi-dimensional arrays. A multi-dimensional
array
> is simply an array that contains arrays in each position.
>
> 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]

