fork download
  1. <?php
  2.  
  3. $arr = array('1', '2', '3', '4');
  4. $bancoDeDados = array('mercedes', 'audi', 'fiat', 'alfa');
  5. $resultado = array_map(null, $arr, $bancoDeDados);
  6.  
  7. print_r($resultado);
Success #stdin #stdout 0.02s 23768KB
stdin
Standard input is empty
stdout
Array
(
    [0] => Array
        (
            [0] => 1
            [1] => mercedes
        )

    [1] => Array
        (
            [0] => 2
            [1] => audi
        )

    [2] => Array
        (
            [0] => 3
            [1] => fiat
        )

    [3] => Array
        (
            [0] => 4
            [1] => alfa
        )

)