# $flatten

Returns a flattened array of items

Usage

    $flatten(<data1>[,<data2>[,...]])

Description

Returns an array of items built from the passed arguments with the following rules:

- If an argument is a scalar value then the argument itself is appended to the result.
- If an argument is an array then each contained item is appended to the result.
- If an argument is a hash then each contained value is appended to the result.

A simple example of usage is to merge N arrays into a new one. (Please note that for merging one array into another the [doc:arrayconcatenation]<+ operator[/doc] is more efficient).

Syntax Specification

    <array> $flatten(<data1:variant>[,<data2:variant>[,...]])

Index, Functions

KVIrc 4.0.2.4740 Documentation
Generated by root at Tue Feb 1 06:16:04 2011