Skip to content

array_union

Hyomoto edited this page Jun 13, 2021 · 5 revisions
Jump To Go Back Arguments

array_union( array1, array2 )

Returns: array

Throws: InvalidArgumentType

Returns a union of the provided arrays. This will produce a new array that contains all of the values in every list, except duplicates. If a provided argument is not an array, InvalidArgumentType will be thrown.

array_union( [ 10, 20, 30 ], [ 20, 30, 40 ] );
Output: [ 10,20,30,40 ]

Arguments

Name Type Purpose
array1 array No description
array2 array No description

Clone this wiki locally