Anyone heard of this?

Results 1 to 2 of 2

Thread: Anyone heard of this?

  1. #1
    Eric L. Guest

    Default Anyone heard of this?

    I would like to take an array, say one from objRs.GetRows, and turn it inside out (kinda). Let me explain it a little better. Pretend the below is my array,<BR><BR>Name1 Address1 State1<BR>Name2 Address2 State2<BR>Name3 Address3 State3<BR><BR>I would like to make it so that it is like this,<BR><BR>Name1 Name2 Name3<BR>Address1 Address2 Address3<BR>States1 State2 State3<BR><BR><BR>I would like to do this so that I may display NOT from top to bottom BUT from side to side. Anyone ever heard of this, or have a fucntion/sub to do this? I can write my own but I was just curious if there is already one. Also, how bad of performance do you think that this would be to do this?<BR><BR>Thanks,<BR>Eric L.

  2. #2
    Join Date
    Dec 1969

    Default Try this script.

    &lt;%@ Language=VBScript %&#062;<BR>&lt;%<BR>Option Explicit<BR><BR>Dim arrInsideOut(3, 3)<BR>Dim i<BR>Dim x<BR>Dim theCol<BR>Dim theRow<BR><BR>Const Names = 0<BR>Const Addresses = 1<BR>Const States = 2<BR>Const Space5 = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"<BR><BR>arrInsideO ut(0, Names) = "Name1"<BR>arrInsideOut(1, Names) = "Name2"<BR>arrInsideOut(2, Names) = "Name3"<BR>arrInsideOut(0, Addresses) = "Address1"<BR>arrInsideOut(1, Addresses) = "Address2"<BR>arrInsideOut(2, Addresses) = "Address3"<BR>arrInsideOut(0, States) = "State1"<BR>arrInsideOut(1, States) = "State2"<BR>arrInsideOut(2, States) = "State3"<BR><BR>For i = LBound(arrInsideOut, 2) to UBound(arrInsideOut, 2)<BR><BR> theCol = i<BR> <BR> For x = LBound(arrInsideOut, 1) to UBound(arrInsideOut, 1)<BR> <BR> theRow = x<BR> <BR> Response.Write arrInsideOut(theRow, theCol)<BR> Response.Write Space5<BR> <BR> Next<BR><BR>Response.Write "&lt;BR&#062;"<BR><BR>Next<BR><BR>%&#062;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts