note 92667 added to function.mb-split
| From: | gert dot matern at web dot de | Date: | Mon, 03 Aug 2009 11:18:16 +0000 |
| Subject: | note 92667 added to function.mb-split | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-159027@lists.php.net to get a copy of this message | ||
I forgot to set the encodings, here an example with adjwilli's function:
<?php
mb_internal_encoding( 'UTF-8');
mb_regex_encoding( 'UTF-8');
function mbStringToArray
( $string
)
{
$stop = mb_strlen( $string);
$result = array();
for( $idx = 0; $idx < $stop; $idx++)
{
$result[] = mb_substr( $string, $idx, 1);
}
return $result;
}
echo '<pre>', PHP_EOL,
print_r( mbStringToArray( 'WeiÃe Rosen sind nicht grün!', true)), PHP_EOL,
'</pre>';
?>
----
Server IP: 212.124.37.9
Probable Submitter: 62.159.240.138
----
Manual Page -- http://www.php.net/manual/en/function.mb-split.php
Edit -- https://master.php.net/note/edit/92667
Del: integrated -- https://master.php.net/note/delete/92667/integrated
Del: useless -- https://master.php.net/note/delete/92667/useless
Del: bad code -- https://master.php.net/note/delete/92667/bad+code
Del: spam -- https://master.php.net/note/delete/92667/spam
Del: non-english -- https://master.php.net/note/delete/92667/non-english
Del: in docs -- https://master.php.net/note/delete/92667/in+docs
Del: other reasons-- https://master.php.net/note/delete/92667
Reject -- https://master.php.net/note/reject/92667
Search -- https://master.php.net/manage/user-notes.php