Skip to content

PHP code snippet – How to add values to an array in laravel?

$array = array('foo' => 'bar');

$array = array_add($array, 'key', 'value');
See also  PHP code snippet - How get just one parameter of all objects in one array in laravel?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.