note 97690 deleted from function.str-split by crell
| From: | crell@php.net | Date: | Wed, 29 Jun 2022 19:40:08 +0000 |
| Subject: | note 97690 deleted from function.str-split by crell | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-218736@lists.php.net to get a copy of this message | ||
Note Submitter: seebz.net
----
here an equivalent function for unicode string :
<?php
function uni_strsplit($string, $split_length=1)
{
preg_match_all('
.u', $string, $arr);
$arr = array_chunk($arr[0], $split_length);
$arr = array_map('implode', $arr);
return $arr;
}