update page now

Voting

: zero plus eight?
(Example: nine)

The Note You're Voting On

Stas Trefilov, Vertilia
10 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