fork download
  1. <?php
  2.  
  3. $arr = array(array('name' => 'email', 'value' => 'teste@teste.com'),
  4. array('name' => 'code', 'value' => 'D9CI8C'),
  5. array('name' => 'nome', 'value' => 'fulano'),
  6. array('name' => 'problema', 'value' => 'algo errado')
  7. );
  8.  
  9.  
  10. $novo = array();
  11. foreach($arr as $item) $novo[$item['name']] = $item['value'];
  12.  
  13. print_r($novo);
  14.  
  15.  
Success #stdin #stdout 0.02s 23424KB
stdin
Standard input is empty
stdout
Array
(
    [email] => teste@teste.com
    [code] => D9CI8C
    [nome] => fulano
    [problema] => algo errado
)