ArrayRemoveDuplicates()
Removes duplicate values from array.
Introduced: 6.0.0.119
ArrayRemoveDuplicates( array=array, ignoreCase=boolean );
Returns: Array
Argument | Description |
---|---|
array
array,
required
|
A array to Removes duplicate |
ignoreCase
boolean,
optional
|
if set to true, the duplicate value will not be case sensitive |
Examples
arrayWithDupes=[ "Swansea Jack", "Bob the Railway Dog", "Banjo", "Cosmo", "Canelo", "Waghya", "Banjo", "Gelert", "Bob the Railway Dog", "Waghya", "Banjo", "Gelert" ];
dump( arrayWithDupes );
arrayWithoutDupes= arrayRemoveDuplicates( arrayWithDupes );
dump( arrayWithoutDupes );
See also
- Arrays
- array.removeDuplicates()
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)