note 108189 added to function.mb-split
| From: | gunkan at terra dot es | Date: | Thu, 05 Apr 2012 18:17:11 +0000 |
| Subject: | note 108189 added to function.mb-split | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-186987@lists.php.net to get a copy of this message | ||
To split an string like this:
"æ¥ãã«ãæ¬ãã»ããèªãã" using the
"ã" delimiter i used:
$v =
mb_split('ã',"æ¥ãã«ãæ¬ãã»ããèªãã");
but didn't work.
The solution was to set this before:
mb_regex_encoding('UTF-8');
mb_internal_encoding("UTF-8");
$v =
mb_split('ã',"æ¥ãã«ãæ¬ãã»ããèªãã");
and now it's working:
Array
(
[0] => æ¥
[1] => ã«
[2] => æ¬
[3] => ã»ã
[4] => èª
[5] => ã
)
----
Server IP: 69.147.83.197
Probable Submitter: 81.34.166.148
----
Manual Page -- http://www.php.net/manual/en/function.mb-split.php
Edit -- https://master.php.net/note/edit/108189
Del: integrated -- https://master.php.net/note/delete/108189/integrated
Del: useless -- https://master.php.net/note/delete/108189/useless
Del: bad code -- https://master.php.net/note/delete/108189/bad+code
Del: spam -- https://master.php.net/note/delete/108189/spam
Del: non-english -- https://master.php.net/note/delete/108189/non-english
Del: in docs -- https://master.php.net/note/delete/108189/in+docs
Del: other reasons-- https://master.php.net/note/delete/108189
Reject -- https://master.php.net/note/reject/108189
Search -- https://master.php.net/manage/user-notes.php