I need to transform this array:
Array
(
[0] => Array
(
[name] => Email
[value] => [email protected]
)
[1] => Array
(
[name] => Telefone
[value] => 22222222222222
)
[2] => Array
(
[name] => Code
[value] => D9CI8C
)
[3] => Array
(
[name] => Nome
[value] => Igor de Oliveir
)
[4] => Array
(
[name] => Problema
[value] => teste
)
)
)
In an assoc array, which is in the format:
array(
['email'] = [email protected]
['telefone'] = 2222222
)
and so on, I tried to apply a foreach, but it returns me the same original array:
$arrayfields = $node['fields'];
$newarrray = array();
foreach ($arrayfields as $name => $value) {
$newarrray[$name] = $value;
}