fork(1) download
  1. <?php
  2.  
  3. $array_banco = array(array('field' => 'data', 'description' => 'Data cadastro'),
  4. array('field' => 'ndereco', 'description' => 'Endereco')
  5. );
  6. foreach($array_banco as $item){
  7.  
  8. $fields[$item['field']] = $item['description'];
  9.  
  10. }
  11.  
  12. var_dump($fields);
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
array(2) {
  ["data"]=>
  string(13) "Data cadastro"
  ["ndereco"]=>
  string(8) "Endereco"
}