Created
July 25, 2014 01:43
-
-
Save Anye/33eb5f15d8db8dc907b4 to your computer and use it in GitHub Desktop.
json encode 兼容中文
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function JSON($data) | |
{ | |
arrayRecursive($data, 'urlencode', true); | |
$json = json_encode($data); | |
return urldecode($json); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment