Tag Link | [Array->RemoveAll] | Category | Array |
---|---|---|---|
Type | Member | Source Available | No |
Support | Preferred | Version | 5.0 |
Change | Unchanged | Data Source | Any |
Output Type | None | Security | None |
Implementation | LCAPI | Sets | Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0 |
[Array->RemoveAll] removes any elements that match the parameter from the array. Accepts a single parameter of any data type. Returns no value.
Note: The specified elements in the array are removed and the indexes of all elements in the array above the index are adjusted down.
[Array->(RemoveAll: 'Find Value')]
Required Parameters | |
---|---|
Find Value | The value of elements which should be removed from the array. |
To find and remove an element from an array:
Use the [Array->RemoveAll] tag. The following example removes all entries for Friday from an array of the days of the week. The resulting array is output.
<?LassoScript
Variable: 'DaysOfWeek'=(Array: 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');
$DaysOfWeek->(RemoveAll: 'Fri');
Output: $DaysOfWeek;
?>
(Array: (Sun), (Mon), (Tue), (Wed), (Thu), (Sat))