This is a simplified example. I want initialize the array in one step:
I thought this would work:
Closer to my real life scenario, I am actually trying to load the array with a split function so that row $i contains 4 columns like this:
Code:
$i++;
$a[$i][0] = "a"
$a[$i][1] = "b";
I thought this would work:
Code:
@a[$i][0..1] = ("a","b")
Closer to my real life scenario, I am actually trying to load the array with a split function so that row $i contains 4 columns like this:
Code:
$letters="a,b,c,d"; # There could be any number of letters in the string
$i++;
@a[$i][] = split(",", $letters);