append

Summary

Appends element(s) to an array.

Usage

$input_array|append( value1 [, value2 [, ... ] ] )

Parameters

NameTypeDescriptionRequired
value1 mixed Stuff to be appended to input. yes
value2 mixed Stuff to be appended to input. no
...

Returns

Array with parameters appended to input array.

Description

Puts the parameter value(s) to the end of the input array/string.

As of Exponential 3.2-5 and Exponential 3.3-4, you may also append multiple strings to a string. In earlier versions, you may only apply one string at a time

Examples

example>

{array( 1, 2, 3 )|append( 4, 5, 6 )}

returns the array(1, 2, 3, 4, 5, 6 ).

example

{array( 1, 2, 3 )|append( array( 4, 5, 6 )}

returns the array( 1, 2, 3, array( 4, 5, 6 ) ).

example
As of Exponential 3.2-5 and Exponential 3.3-4, you may also append multiple strings to a string. In older version, only the first parameter ("1 ") will be appended:

{"Testing "|append( "1 ", "2 ", "3" )}

Comments

log in or create a user account to comment.

Contents

Reference

Database diagram
Template operators
    PDF
    Arrays
       array_sum
       append
       array
       array_append
       array_merge
       array_prepend
       begins_with
       compare
       contains
       ends_with
       explode
       extract
       extract_left
       extract_right
       hash
       implode
       insert
       merge
       prepend
       remove
       repeat
       reverse
       array_sum
       unique
    Data extraction
    Formatting
    Images
    Logic
    Mathematics
    Miscellaneous
    Strings
    URLs
    Variables
Template functions
Data fetching
Modules
XML tags


Created

05/02/2004
10:26:27 am
by Balazs Halasy

Last updated

24/02/2004
12:27:40 pm
by Vidar Langseid

Authors

Balazs Halasy
Kåre Køhler Høvik
Vidar Langseid



This page is part of the Exponential documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.