fork(1) download
  1. <?php
  2. $array = array(
  3. 'quantidade' => array(
  4. '10',
  5. '11',
  6. '15',
  7. '22'
  8. ),
  9. 'produto' => array (
  10. '11',
  11. '18',
  12. '19',
  13. '21'
  14. )
  15. );
  16.  
  17. $array_aux = array_combine( $array['quantidade'], $array['produto'] );
  18.  
  19. print_r( $array_aux );
Success #stdin #stdout 0.01s 52488KB
stdin
Standard input is empty
stdout
Array
(
    [10] => 11
    [11] => 18
    [15] => 19
    [22] => 21
)