Good evening, I need to create a code in php that meets the following situation:
I have an array of arrays $ arrayTudo = [$ array1, $ array2, $ array3];
I calculate an X value and I want to throw it in array1, for example. It could be in any of them. How to do array_push in this case? Is it possible to throw this value X into an array inside another array?
Before coding, I need to understand how to do this.
It would look something like this:
<%php
$array1 = [];
$array2 = [];
$array3 = [];
$arrayTudo = [$array1, $array2, $array3];
$x = 10;
array_push($arrayTudo[0], $x);
%>
I select one of the arrays to receive the value X. The first array, for example. Is this possible?