I’m trying to split a string into an array.
I’ve tried str_split() but the problem is that characters like “äüöÄÜÖß” don’t work (they become questionmarks)
So I’m trying to do the same with mb_split(), but I don’t know how to get the right Regex for it.
Can you please help me?
Here is the code:
$arr = mb_split("\.", $str);
You might try:
For the
/umodifier, see http://php.net/manual/en/reference.pcre.pattern.modifiers.php :“u (PCRE8) This modifier turns on additional functionality of PCRE that is incompatible with Perl. Pattern strings are treated as UTF-8. This modifier is available from PHP 4.1.0 or greater on Unix and from PHP 4.2.3 on win32. UTF-8 validity of the pattern is checked since PHP 4.3.5.”