<cfscript>
SingleArray = ArrayNew(1);
SingleArray[1] = "One";
SingleArray[2] = "Planes";
SingleArray[3] = "Twelve";
SingleArray[4] = "Jets";

DoubleArray = ArrayNew(2);
j=0;
for (x = 1; x lt arraylen(SingleArray); x = x + 2) {
    j = j + 1;
    DoubleArray[j][1] = SingleArray[x];
    DoubleArray[j][2] = SingleArray[x+1];
}
</cfscript>



On Fri, 16 Aug 2002, Dowdell, Jason G wrote:

> I have a single dimensional array that I want to duplicate
> into a 2 dimensional array.  The first dimension are all odd
> numbers in the array and the second dimension are all the
> even numbers in the array.
>
> e.g.
> Array as it exists now...
> Array[1] = "One"
> Array[2] = "Planes"
> Array[3] = "Twelve"
> Array[4] = "Jets"
>
> Array I want to make...
> Array[1][1] = "One"
> Array[1][2] = "Planes"
> Array[2][1] = "Twelve"
> Array[2][2] = "Jets"
>
> Any thoughts?
>
> ~Jason
>
> <!---
>      Jason Dowdell
>      [EMAIL PROTECTED]
>      321.799.6845
>      IM AES - Web Developer
>  --->
>
> 
______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to