← All built-ins / split()
split()
split(string $haystack, string $needle): mixed
Parameters
| Name | Type | Description |
|---|---|---|
| $separator | string | delimiter |
| $s | string | string to split |
Return value
Alias of explode().
Example
echo implode("+", split("-", "1-2-3"));1+2+3