I've never done a great deal of work with arrays before, and certainly not multi-dimensional ones, but I seem to have hit a slight limitation.

Basically, what I want to do is this:

code:
$x = 1,2,3
Dim $y
for $count = 0 to ubound($x)
$y[$count] = $x[$count]
next

As I understand it, this should be the same as

code:
$x = 1,2,3
Dim $y
$y = $x

But for some reason, only the second example works. Even avoiding the For...Next construct and just trying...

code:
$x = 1,2,3
Dim $y
$y[0] = $x[0]

...fails. Is this because I'm not declaring the size of the $y array when I Dim it? Should I try something like...

code:
$x = 1,2,3
Dim $y[ubound($x)]

...to get around this? Any advice would be appreciated. Later on in my process, I will want to assign the resultant $y array to an element of the $z array, which will become a series of $y's. Is this going to fail horribly? Can anyone suggest another way of doing this? Or will I need to do something entirely different to start working with multi-dimensional arrays?

Thanks in advance,

Breaker
_________________________
================================================
Breaker