returnUnique()
returnUnique(array $data, $assoc = false) : array
Return Unique (array)
This can be used as an alternative to array_unique when that built-in function doesn't seem to work for your purposes. This is not recusrive but should work on associative arrays (though, haphazardly)
Version 4: Compatible with PHP 7 Added associative option as second default argument
Parameters
array | $data | The given data to sort |
$assoc |
Returns
array —The unique array, this DOES NOT alter the argument