How to create a dynamic array in this way:
//Apenas um exemplo abaixo:
String valor0 = "1;2;3;4;5;6;7;8;9;0";
String valor1 = "1;2;3;4;5;6;7;8;9;0";
String valor2 = "1;2;3;4;5;6;7;8;9;0";
//Um array dentro de outro array, porém sem definir seu tamanho
String[][] valor = {};
//E então definir os valores do segundo [] com split também
valor[0][] = valor0.split(";");
valor[1][] = valor1.split(";");
valor[2][] = valor2.split(";");
So he would create the keys and after creating, set the values of the other array inside each key with the split. The size should be with the split, because this will be dynamic, will change constantly. In cases of just being a normal array, I know that split populate it dynamically without having to set the size, but I'd like to do the same with a two-dimensional array.
The example does not work, of course, it's just for show.
The array looks something like this:
array (size=3)
0 =>
array (size=10)
0 => string '1' (length=1)
1 => string '2' (length=1)
2 => string '3' (length=1)
3 => string '4' (length=1)
4 => string '5' (length=1)
5 => string '6' (length=1)
6 => string '7' (length=1)
7 => string '8' (length=1)
8 => string '9' (length=1)
9 => string '0' (length=1)
1 =>
array (size=10)
0 => string '1' (length=1)
1 => string '2' (length=1)
2 => string '3' (length=1)
3 => string '4' (length=1)
4 => string '5' (length=1)
5 => string '6' (length=1)
6 => string '7' (length=1)
7 => string '8' (length=1)
8 => string '9' (length=1)
9 => string '0' (length=1)
2 =>
array (size=10)
0 => string '1' (length=1)
1 => string '2' (length=1)
2 => string '3' (length=1)
3 => string '4' (length=1)
4 => string '5' (length=1)
5 => string '6' (length=1)
6 => string '7' (length=1)
7 => string '8' (length=1)
8 => string '9' (length=1)
9 => string '0' (length=1)
I made this example in php