Tutorial

Getting Started with Macros

Macro Editor

User Interface

Menus and Toolbar

Editing Macros

Macro Debugging

How To

Using variables

Finding and modifying objects

Creating new page content

Asking for user input

Storing persistent data

Using binary data

Sorting objects

Macro menus

Bulleted and numbered lists

Sample Macros

Concepts

Expressions

Objects

Properties

Variables

Data Types

Arrays

Functions

Literals

Operators

Comments

Last updated on: September 02, 2024
Also available as a single HTML file

Onetastic Macro Documentation > Functions > Array Functions > Array_Unique

Array_Unique

Removes duplicate elements from the given array. Keys are preserved but the order of elements may be changed.

Syntax

void Array_Unique(byref Array array)

Parameters

Array array
Array to remove the duplicates from.

Examples

$array = Array(2, 6, 4, 3, 5, 9, 1, 2, 7, 5, 1, 4, 2, 6) Array_Unique($array) // $array is: // 6 => 1 // 0 => 2 // 3 => 3 // 2 => 4 // 4 => 5 // 1 => 6 // 8 => 7 // 5 => 9

Reference

Statements

Hierarchy Objects

Page Objects

Other Objects

Functions

Array Functions

Color Functions

Data Store Functions

Date/Time Functions

Dialog Box Functions

Macro Execution Functions

Macro Menu Functions

Object Functions

Special Functions

String Functions

Window Functions