explode

PHP 4, PHP 5, PHP 7, PHP 8
explode - Split a string by a string
Explode Online Tool
Manual
Code Examples

Example #1 explode return examples

Result: array(1) ( [0] => string(5) "hello" ) array(2) ( [0] => string(5) "hello" [1] => string(5) "there" ) array(2) ( [0] => string(0) "" [1] => string(0) "" )
PHP Version:

Example #2 <span class='function-parameter'>limit</span> parameter examples

Result: Array ( [0] => one [1] => two|three|four ) Array ( [0] => one [1] => two [2] => three )
PHP Version:

Example #3 explode examples

PHP Version:


Example #4 of explode

PHP Version:


Function explode:

Strings Functions

Most used PHP functions