fork(1) download
  1. <?php
  2. $arr = array(array('nome' => 'fulano'), array('nome' => 'beltrano'), array('nome' => 'doge') );
  3. $chaves = array_column($arr, 'nome');
  4. $novo = array_fill_keys($chaves, 0);
  5. print_r($novo);
Success #stdin #stdout 0.01s 82880KB
stdin
Standard input is empty
stdout
Array
(
    [fulano] => 0
    [beltrano] => 0
    [doge] => 0
)