J
jeanluc
I want to create a 2D array whose values initially contains 0.0
I see that the following code will set up a 3x2 2D array:
@2D_array = (
[0.0, 0.0, 0.0],
[0.0, 0.0, 0.0],
);
The above works fine but unfortunately I might have to make some large
arrays of arbitrary size. Doing it manually like above is not
possible.
I want to use the variables
$no_rows = 50;
$no_columns = 63;
To define a 50x63 2D arbitrary array filled with 0.0.
Anybody know how to do this?
Thanks!
I see that the following code will set up a 3x2 2D array:
@2D_array = (
[0.0, 0.0, 0.0],
[0.0, 0.0, 0.0],
);
The above works fine but unfortunately I might have to make some large
arrays of arbitrary size. Doing it manually like above is not
possible.
I want to use the variables
$no_rows = 50;
$no_columns = 63;
To define a 50x63 2D arbitrary array filled with 0.0.
Anybody know how to do this?
Thanks!