I need to fill a multidimensional array with simple arrays recursively at positions specified by for loops, and that need to be done with the same multidimensional array.
The first time the multid. array is filled is in the code below
$vector_provisor = array ();
for ($i = 0; $ i <variable_variable; $i++)
{
array_push($vector_temp, 0);
}
$ element_pivot =$ lines [$index_line_pivot] [$index_column_pivo];
for ($j = 0, $j <dim - 1, j++)
{
$value = $rows [$index_line_pive] [$j] / $element_pivot;
array_push ($vector_provisor, $ value);
$index = array ($index_line_pivot);
}
#that's the array filled:
$new_lines {$index} = array_fill_keys ($index, $vector_provisor);
Now let's say the first time it filled position [1], if I try to repeat that, in another for loop, for positions [1] and [2], but without creating the array again, it simply empties all the positions and I got an empty array.
What could I do?