PHP » GoLang |
login |
register |
about
|
explode(PHP 4, PHP 5, PHP 7) explode — Split a string by a string Description
array explode
( string
$delimiter
, string $string
[, int $limit = PHP_INT_MAX
] )
Returns an array of strings, each of which is a substring of
Parameters
Return Values
Returns an array of strings
created by splitting the
If Changelog
Examples
Example #1 explode() examples
<?php
Example #2 explode() return examples
<?phpThe above example will output:
array(1)
(
[0] => string(5) "hello"
)
array(2)
(
[0] => string(5) "hello"
[1] => string(5) "there"
)
array(2)
(
[0] => string(0) ""
[1] => string(0) ""
)
Example #3
<?phpThe above example will output:
Array
(
[0] => one
[1] => two|three|four
)
Array
(
[0] => one
[1] => two
[2] => three
)
Notes
See Also
|
more
Most requested
more
Last requests
|