Skip to content

Instantly share code, notes, and snippets.

@tieutantan
Last active December 23, 2016 12:09
Show Gist options
  • Save tieutantan/c43326c610bf0e464739 to your computer and use it in GitHub Desktop.
Save tieutantan/c43326c610bf0e464739 to your computer and use it in GitHub Desktop.
Convert Unicode String to Array by character
<?php
$string = "U li cốt đây lày";
$array = preg_split('/(?<!^)(?!$)/u', $string);
print_r($array);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment