Add array to another without creating indexes in PHP

0

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) { } 
    
asked by Emmanuel Fernandez 27.10.2018 в 21:12
source

0 answers