Home > Article > Backend Development > php json_encode Chinese does not transcode
1. php json_encode Chinese does not transcode, and the following two conditions need to be met
2. json_encode() sample code
3. Save the above code and preview it in the browser
4. Fill in the second one for json_encode() Parameter: JSON_UNESCAPED_UNICODE, which can realize Chinese non-transcoding
5. Save the code again and view the encoded JSON format string in the browser. Chinese characters are displayed normally
Recommended tutorial: PHP video tutorial
The above is the detailed content of php json_encode Chinese does not transcode. For more information, please follow other related articles on the PHP Chinese website!