September 2001
Intermediate to advanced
768 pages
32h 45m
English
array split(string pattern, string subject, [int limit])
| pattern | Regex pattern to split by |
| subject | Input string to split |
| limit | Limits the number of results |
Splits the subject string along the boundaries defined by the specified POSIX regular expression pattern.
Returns:
Array containing the results of splitting; FALSE if an error occurs
Description:
This function splits the given subject string into substrings on the boundaries matching the specified pattern . The optional parameter limit specifies how many pieces to return; if -1 or omitted, all pieces are returned. Otherwise, exactly limit pieces are returned, with the last piece containing the remainder of the subject string that was not split.
If the string needs to be split ...
Read now
Unlock full access