explode() / implode()
Splits text into an array / joins an array into text.
Syntax
explode($separator, $text) · implode($separator, $arr)
Description
explode splits text into parts (arr); implode does the reverse (text).
Example
Loading editor…
Expected output
a-b-c
When to use?
CSV parsing, arr→text conversion.