I have a foreach () that in each iteration adds arrays of 40 elements to another array, as shown in the following code:
foreach($aVideos as $aVideo)
{
$aVideosReproducciones[] = $this->obtenerReproducciones($aVideos);
}
Assuming the foreach () iterated 3 times and I do a var_dump of $ aVideosReproducciones I get something like this:
array(3) { [0]=> array(40) {[0]=> array(20) { ["titulo"]=> string(65)...
When what I would like to get is something like this:
array(120) { [0]=> array(20) { ["titulo"]=> string(65) ...
I tried with array_push and I get the same result, I also tried with array_merge but now I get an empty array:
array(0) { }