0
Good evening, I need to create a php code that meets the following situation:
I have an array of arrays $arrayTudo = [$array1, $array2, $array3];
I calculate an X value and want to play it in array1, for example. It could be in any one of them. How to do array_push in this case? You can play this X value in an array within 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);
%>
select one of the arrays to receive the value X. The first array, for example. This is possible?
I get it. I think that’s the logic I needed. I’ll test it. Thank you.
– Ronda
@Round dispose
– Fabiano Monteiro