array_add()
This method is used to add new key value pairs to an array.
$array = ['username' => 'testuser']; $array = array_add($array, 'age', 18);
result
['username' => 'testuser', 'age' => 18]