Function array_set
Set an array item to a given value using "dot" notation.
If no key is given to the method, the entire array will be replaced.
// Set the $array['user']['name'] value on the array array_set($array, 'user.name', 'Taylor'); // Set the $array['user']['name']['first'] value on the array array_set($array, 'user.name.first', 'Michael');
Located at laravel/helpers.php
array |
& $array |
|
string |
$key |
|
mixed |
$value |