<?php $a = [ 'a' => ['first' => 1], 'b' => ['first' => 2], 'c' => ['first' => 3], ]; foreach ($a as &$i) { $i['second'] = $i['first']; } foreach ($a as &$i) {} var_dump($a);
You have javascript disabled. You will not be able to edit any code.