explode

array explode(string boundary, string string, [int limit]) 
boundary String denoting the boundary between array elements
string String to parse into an array
limit Maximum number of array elements to return

Splits a string into an array of substrings.

Returns:

Array containing zero or more substrings of the string argument; FALSE on error or if the boundary argument is empty

Description:

explode() is used to break a string into an array. The array is created by parsing the string from left to right. The first array element contains every character from the first character of the string to the first occurrence of the character(s) contained in the boundary argument. Subsequent array elements contain every character after the previous ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.