Phpjson syntax_error syntax error

Source: Internet
Author: User
: This article mainly introduces the phpjsonsyntax_error syntax error. if you are interested in the PHP Tutorial, refer to it.
{"Code": 100, "data": [{"id": "1" },{ "id": "2" },{ "id ": "3" },{ "id": "4" },{ "id": "5" },{ "id": "6" },{ "id ": "7" },{ "id": "8" },{ "id": "9" },{ "id": "10"}]}

The preceding section of Json is completely legal, but the output to the client server (PHP) is decoded to null. json_last_error_msg () prompts a syntax error, which cannot be solved.

Add ob_clean () to the output to clear the cache.

The above introduces a pitfall of php json syntax_error syntax errors, including some content, and hope to be helpful to friends who are interested in PHP tutorials.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.