Voting

: min(one, zero)?
(Example: nine)

The Note You're Voting On

Stas Trefilov, Vertilia
9 years ago
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] => я
)

<< Back to user notes page

To Top