Skip to content

Instantly share code, notes, and snippets.

@outman
Created September 13, 2012 09:20
Show Gist options
  • Save outman/3713130 to your computer and use it in GitHub Desktop.
Save outman/3713130 to your computer and use it in GitHub Desktop.
Split Chinese String By Space To A New
$cn_string_split_by_space = implode(" ", preg_split('//u', "中文字符串", -1, PREG_SPLIT_NO_EMPTY));
@outman
Copy link
Author

outman commented Sep 13, 2012

resutl : "中 文 字 符 串"

@outman
Copy link
Author

outman commented Sep 13, 2012

result is : "中 文 字 符 串"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment