I have an array:
$array = [
'foo' => 44,
'bar' => 77,
'moo' => 88,
];
Now I have two variables, $key and $value, and I want to replace the first index of the array. So remove foo and 44, and add $key and $value in their place.
So my array becomes:
$array = [
$key => $foo,
'bar' => 77,
'moo' => 88,
];
How may I do this?