Atualizar valores na matriz em php
//With Keys
$array['key3'] = 'new value';
//Without Knowing Keys
$array[2] = 'new value';
Dropout Programmer
//With Keys
$array['key3'] = 'new value';
//Without Knowing Keys
$array[2] = 'new value';
$employee = [
"bill" => 25,
"steve" => 36,
"alice"=>44
];
$employee["alice"] = 48;
$employee["musk"] = 42;//to add
echo "<pre>";
print_r ($employee);
echo "</pre>";