PHP Manual
Prev |  | Next

# explode

explode -- Split a string by string

## Description

`array explode`(string separator, string string);

Returns an array of strings containing the elements separated by `separator`.

Example 1. Explode() example
      1
      2 $pizza = "piece1 piece2 piece3 piece4 piece5 piece6";
      3 $pieces = explode (" ", $pizza);
      4

See also split() and implode().

Prev | Home | Next
echo | Up | flush