note 117588 added to function.mb-split

From: Date: Thu, 02 Jul 2015 11:01:50 +0000
Subject: note 117588 added to function.mb-split
Groups: php.notes 
Request: Send a blank email to php-notes+get-203028@lists.php.net to get a copy of this message
a (simpler) way to extract all characters from a UTF-8 string to array with a single call to a built-in function: <?php $str = 'Ма- руся'; print_r(preg_split('//u', $str, null, PREG_SPLIT_NO_EMPTY)); ?> Output: Array ( [0] => М [1] => а [2] => - [3] => [4] => р [5] => у [6] => с [7] => я ) ---- Server IP: 72.52.91.14 Probable Submitter: 83.167.33.212 ---- Manual Page -- http://php.net/manual/en/function.mb-split.php Edit -- https://master.php.net/note/edit/117588 Del: integrated -- https://master.php.net/note/delete/117588/integrated Del: useless -- https://master.php.net/note/delete/117588/useless Del: bad code -- https://master.php.net/note/delete/117588/bad+code Del: spam -- https://master.php.net/note/delete/117588/spam Del: non-english -- https://master.php.net/note/delete/117588/non-english Del: in docs -- https://master.php.net/note/delete/117588/in+docs Del: other reasons-- https://master.php.net/note/delete/117588 Reject -- https://master.php.net/note/reject/117588 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#203028) next »