Tutorial

Getting Started with Macros

Macro Editor

User Interface

Menus and Toolbar

Editing Macro Statements

Expression Editor

Macro Debugging

How To

Using variables

Finding and modifying objects

Creating new page content

Asking for user input

Storing persistent data

Sorting objects

Sample Macros

Concepts

Expressions

Objects

Properties

Variables

Data Types

Arrays

Functions

Literals

Operators

Comments

Last updated on: April 17, 2021
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

For

ForEach

If

Else If

Else

Switch

Case

Default

While

Expression

Comment

Break

Continue

Return

Hierarchy Objects

NotebookRoot

Notebook

SectionGroup

Section

Page

Page Objects

Title

Outline

Table

Column

Row

Cell

Paragraph

Text

Image

EmbeddedFile

Tag

Other Objects

DialogBox

Functions

Array Functions

Color Functions

Data Store Functions

Date/Time Functions

Dialog Box Functions

Macro Execution Functions

Object Functions

String Functions