note 92667 deleted from function.mb-split by danbrown

From: Date: Mon, 03 Aug 2009 16:45:46 +0000
Subject: note 92667 deleted from function.mb-split by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-159036@lists.php.net to get a copy of this message
Note Submitter: gert dot matern at web dot de ---- 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>'; ?>

« previous php.notes (#159036) next »