Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

array_difference

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

array_difference( array1, array2 )

Returns: array

Throws: InvalidArgumentType

Returns a new array containing the difference of both arrays. These are the values that are only in the first array. If an array is not provided to either argument, InvalidArgumentType will be thrown.

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

Arguments

Name Type Purpose
array1 array No description
array2 array No description

Clone this wiki locally