explode
explode — Split a string by a string.Description
explode( string $separator,Returns an array of strings, each of which is a substring of string formed by splitting it on boundaries formed by the string separator.
string $string,
int $limit = PHP_INT_MAX ): array
Parameters
separator
The boundary string.
string
The input string.
limit
If limit is set and positive, the returned array will contain a maximum of limit elements with the last element containing the rest of string.
If the limit parameter is negative, all components except the last -limit are returned.
If the limit parameter is zero, then this is treated as 1.
Return Values
Returns an array of strings created by splitting the string parameter on boundaries formed by the separator. If separator is an empty string (""), explode() will return false. If separator contains a value that is not contained in string and a negative limit is used, then an empty array will be returned, otherwise an array containing string will be returned. If separator values appear at the start or end of string, said values will be added as an empty array value either in the first or last position of the returned array respectively.More information about explode on official PHP documentation site
explode - Popular snippets
- PHP 8.2.13 / MySQL 5.7 microtime round explode end
last run:
2024-08-30 19:40:32
35
- PHP 8.1 / MySQL 5.7 explode end microtime number_format
last run:
2024-08-28 06:55:16
17
- PHP 8.1 / MySQL 5.7 explode strrev
last run:
2022-10-17 20:52:32
17
- PHP 7.4 / MySQL 8.0 mysqli_query mysqli_fetch_assoc explode count array_push trim array_count_values array_keys print_r
last run:
2023-06-06 16:46:02
15
- PHP 7.4 / MySQL 5.7 array_map explode var_dump
last run:
2023-02-09 19:13:23
11
- PHP 8.1 / MySQL 5.7 shuffle explode
last run:
2023-01-11 12:31:54
11
- PHP 8.0 / MySQL 5.7 explode preg_match substr strpos
last run:
2022-02-11 21:10:03
11
- PHP 8.1 / MySQL 5.7 explode array_pop print_r floor microtime
last run:
2024-07-27 21:32:46
10
- PHP 8.1 / MySQL 5.7 shuffle explode
last run:
2023-01-11 12:22:51
10
- PHP 8.2.13 / MySQL 5.7 microtime number_format explode round end
last run:
2024-08-30 19:42:48
9
explode - New snippets
-
PHP 8.2.13 / MySQL 5.7 microtime strtotime usort explode
added at:
2024-09-23 22:56:39
3
-
PHP 8.2.13 / MySQL 5.7 microtime strtotime usort explode
added at:
2024-09-23 22:53:21
2
-
PHP 8.2.13 / MySQL 5.7 microtime strtotime uasort explode
added at:
2024-09-23 22:46:30
1
-
PHP 8.2.13 / MySQL 5.7 explode microtime strtotime
added at:
2024-09-23 22:40:57
2
-
PHP 8.2.13 / MySQL 5.7 strtotime array_multisort array_column date explode microtime
added at:
2024-09-23 22:38:51
1
-
PHP 8.2.13 / MySQL 5.7 microtime strtotime array_multisort array_column explode
added at:
2024-09-23 22:33:36
1
-
PHP 8.2.13 / MySQL 5.7 microtime strtotime array_multisort array_column explode
added at:
2024-09-23 22:33:23
1
-
PHP 8.2.13 / MySQL 5.7 microtime array_multisort strtotime array_column explode
added at:
2024-09-23 22:30:39
1
-
PHP 8.2.13 / MySQL 5.7 microtime array_multisort strtotime array_column explode
added at:
2024-09-23 22:30:13
1
-
PHP 8.2.13 / MySQL 5.7 microtime array_multisort strtotime explode
added at:
2024-09-23 22:27:12
1