fork download
  1. <?php
  2.  
  3. $nomes = array('fulano', 'joão', 'maria', 'george');
  4. $tipos = array ('meia', 'inteira', 'meia', 'meia');
  5.  
  6. $novo = array_map(function($nome, $tipo){ return array($nome, $tipo);}, $nomes, $tipos);
  7.  
  8. print_r($novo);
Success #stdin #stdout 0.01s 82880KB
stdin
Standard input is empty
stdout
Array
(
    [0] => Array
        (
            [0] => fulano
            [1] => meia
        )

    [1] => Array
        (
            [0] => joão
            [1] => inteira
        )

    [2] => Array
        (
            [0] => maria
            [1] => meia
        )

    [3] => Array
        (
            [0] => george
            [1] => meia
        )

)