PHP mb_split() Function Last Updated : 28 Apr, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report The mb_split() is an inbuilt PHP function that split the multibyte strings with help of the regular expression. Syntax: mb_split(pattern,string,limit): array|falseParameters: This function accepts 3 parameters: pattern: In this parameter, we define a regular expression that helps us to split a string.string: This parameter defines a string that's going to be split using by pattern parameter.limit: This parameter is an optional parameter. This parameter defines the maximum limit of the split string.Return value: If this function executes successfully then it will return an array otherwise it will return "false". Example 1: The following code demonstrates the mb_split() function. PHP <?php print_r(mb_split('\s',"Hello GeeksforGeeks")); ?> Output: Array ( [0] => Hello [1] => GeeksforGeeks ) Example 2: The following code demonstrates the mb_split() function using a delimiter. PHP <?php $string = "The,longest,sentence,in,English,is,also,awesome"; $characters = mb_split(",", $string); print_r($characters); ?> Output: Array ( [0] => The [1] => longest [2] => sentence [3] => in [4] => English [5] => is [6] => also [7] => awesome ) Reference: https://www.php.net/manual/en/function.mb-split.php Comment More infoAdvertise with us Next Article PHP mb_stripos() Function N neeraj3304 Follow Improve Article Tags : PHP PHP-function PHP-Multibyte-String Similar Reads PHP mb_str_split() Function The mb_str_split() function was introduced in the release of PHP version 7.4.0 and it is only supported with PHP versions equal to or greater than 7.4.0. The mb_str_split() function serves as an alternate of str_split() function. It is used to split the given string with the specified length of chun 2 min read PHP mb_strstr() Function The mb_strstr() function is an inbuilt function in PHP that finds the first occurrence of a given string in the main string, i.e. it will search for the occurrence of the first needle in haystack, & id found then the portion of the haystack will be returned, otherwise return false. Syntax: mb_st 2 min read PHP | preg_split() Function The preg_split() function is an inbuilt function in PHP which is used to convert the given string into an array. The function splits the string into smaller strings or sub-strings of length which is specified by the user. If the limit is specified then small string or sub-strings up to limit return 3 min read PHP mb_stripos() Function The mb_stripos() function is an inbuilt case-insensitive function that finds the first occurrence of a substring in the string. Syntax: int|false mb_stripos( string $haystack, string $needle, int $offset , ?string $encoding);Parameters: This function accepts 4 parameters that are described below. $h 2 min read PHP mb_strimwidth() Function The mb_strimwidth() function is an inbuilt function in PHP that returns the truncated string for the specified width. Syntax: string mb_strimwidth($string, $start, $width, $trim_marker, $encoding )Parameters: This function accepts five parameters that are described below: $string: This parameter spe 2 min read PHP mb_parse_str() Function The mb_parse_str() is an inbuilt function in PHP that is used to parse a string into variables. It is very similar to parse_str(). But it operates multibyte characters. Syntax: mb_parse_str($string, $result): boolParameters: This function accepts two parameters that are described below. $string: Inp 1 min read Like