prepend

Summary

Adds element(s) to start of an array.

Usage

$input_array|prepend( element1 [, element2 [, ... ] ] )

Parameters

NameTypeDescriptionRequired
element1 mixed Element to add to start of array yes
element2 mixed Element to add to start of array no
...

Returns

Array with specified elements in front of input array.

Description

Adds the parameter value(s) at the start of the input array.

Examples

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

returns tha array(1,2,3,4,5).

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:33:25 am
by Balazs Halasy

Last updated

05/02/2004
2:30:19 pm
by K�re K�hler H�vik

Authors

Balazs Halasy
K�re K�hler H�vik



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.