Jump to content



Recommended Posts

Link to comment
Share on other sites

Use Ubound() to get the size of the arrays, Global/Local to create the new 2D array, then one For/Next loop nested inside the another to copy the data from the two 1D arrays into the new 2D array. Take a shot at it and post your code if you need more help.


Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

My mind tells me to write this:


Global $array1[5] = ["A","B","C","D","E"]
Global $array2[5] = [1,2,3,4,5]

$s = UBound($array1)

global $array3[$s][2]

for $i = 0 to $s
$array3[$i][1] = $array1[$i]
$array3[$i][2] = $array2[$i]


...but (of course) it's not right ;))

Any ideea about what can be wrong?

Edit: I've got it, it has to be:

for $i = 0 to $s -1
$array3[$i][0] = $array1[$i]
$array3[$i][1] = $array2[$i]

Thank you a lot for your help!!!

Happy New Year! :evil:

Edited by Kiti
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

  • Recently Browsing   0 members

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