라라벨 array_add()

$arr = array('name' => 'Desk');
$arr = array_add( $arr, 'price', 100);
print_r( $arr );
# Array
# (
#     [name] => Desk
#     [price] => 100
# )

순수 PHP

$arr = array('name' => 'Desk');
$arr['price'] = 100;
print_r($arr);
# Array
# (
#     [name] => Desk
#     [price] => 100
# )

라라벨 array_collapse()

$array = array_collapse([[1], ['hello', 3], [1, 2, 'hello']]);
print_r( $array );
# Array
# (
#     [0] => 1
#     [1] => hello
#     [2] => 3
#     [3] => 1
#     [4] => 2
#     [5] => hello
# )

라라벨 array_divide()

$member = [
	"id" => "102",
	"name" => "Yonezawa Akinori",
	"address" => "Naha, Okinawa"
];
list($keys, $values) = array_divide($member);
print_r( $keys );
# Array
# (
#     [0] => id
#     [1] => name
#     [2] => address
# )
print_r( $values );
# Array
# (
#     [0] => 102
#     [1] => Yonezawa Akinori
#     [2] => Naha, Okinawa
# )

라라벨 array_dot()

print_r( array_dot(['foo' => ['bar' => 'baz']]) );
# Array
# (
#     [foo.bar] => baz
# )
print_r( array_dot(['foo' => ['bar' => ['baz' => 'hello']]]) );
# Array
# (
#     [foo.bar.baz] => hello
# )