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_FromKeysAndValues

Array_FromKeysAndValues

Creates an array by using one array for keys and another for its values. The given arrays must have the same size.

Syntax

Array Array_FromKeysAndValues(
	Array keys, 
	Array values)

Parameters

Array keys
Keys to use for the array. Must contain only numeric or string values.
Array values
Values to use for the array.

Examples

$keys = Array("color", "size", "type") $values = Array("red", "large", "t-shirt") $array = Array_FromKeysAndValues($keys, $values) // This created the following array // "color" => "red" // "size" => "large" // "type" => "t-shirt"

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