There are two arrays: $images and $count , you need to create one array where there is such an architecture

 $Arr( [0] -> Arr([0] -> $images = 'mda.jpg', [1] -> $count = '5') [1] -> Arr([0] -> $images = 'takoe.jpg', [1] -> $count = '6') ) 
  • This architecture in the arrays can not be. - Visman
  • Please, in the question clearly indicate the approximate structure of the arrays $images and $count : keys and values. And what result array do you want to get. Examples of how it looks can be viewed in the documentation - Arrays . Pay attention to the syntax of the programming language . - Alexander Bragin

1 answer 1

If you need to glue the element with index 0 with the element of another array with the same key, use something like this:

 for ($i = 0, $i<count($images), $i++) { $result [] = [images[$i], $count[$i]]; }