Jump to content

Tell a value where to go in an array


Recommended Posts

I have two arrays. In one array (which I will call $mainArray) has a piece of information which I need to see if another array (which I will call $dataArray) has in common. If they do, I need a piece out of the $dataArray to go in to the $mainArray. I would like the piece that I pull from $dataArray to be put in to the same row that it relates to in the $mainArray. The $mainArray gets turned into a txt file and should be readable like a report (not sloppy.) I have the data pulling, but I am stumped as how to get it to line up. I can provide a sample of the code if it helps. However, I cannot provide the information that it pulls. I hope what I am asking makes sense.

Here is my loop where the data gets pulled into the array

$count = 0
                Do
                    For $i = $count to UBound ($aArray) -1
                    If $aArray[$i][1] = '' Then
                        sleep(10)
                    else
                    $client =$aArray[$i][1]
                    Msgbox(64,'',$client) ; so I can see whats happening.
                        For $i=0 to UBound($aWyse) - 1
                            If $aWyse[$i][0] = $client Then $aArray[$i][2]=" "&$aWyse[$i][9] ; I am pretty sure I need to get $i for $aWyse to match up to where the match was found in $aArray. But how?
                        Next
                    Endif
                Next
                $count = $count + 1
                Until $count = UBound ($aArray)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...