explode

Summary

Splits a string into an array of substrings.

Usage

$input_string|explode( separator )

Parameters

NameTypeDescriptionRequired
separator string Where to split. no

Returns

an array of strings.

Description

The explode operator will return an array of strings. Each element in the array will be a substring of the input_string formed by splitting it on boundaries defined by the separator string. Explode will also accept an array as input. Look at the explode operator within the arrays category for more info about using explode with arrays.

Examples

{"All-your-base-are-belong-to-us!"|explode("-")}

returns the following array of strings:
("All","your","base","are","belong","to","us!")

Comments

Contents

Reference

Database diagram
Template operators
    PDF
    Arrays
    Data extraction
    Formatting
    Images
    Logic
    Mathematics
    Miscellaneous
    Strings
       mimetype_icon
       append
       begins_with
       break
       ord
       compare
       concat
       contains
       count_chars
       count_words
       crc32
       downcase
       ends_with
       explode
       extract
       extract left
       extract_right
       indent
       insert
       md5
       nl2br
       chr
       pad
       prepend
       remove
       repeat
       reverse
       rot13
       shorten
       simplify
       trim
       upcase
       upfirst
       upword
       wash
       wordtoimage
       wrap
    URLs
    Variables
Template functions
Data fetching
Modules
XML tags


Created

05/02/2004
11:55:46 am
by Balazs Halasy

Last updated

10/02/2004
5:09:38 pm
by Balazs Halasy

Authors

Balazs Halasy



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.