Return value of coherent echo

Source: Internet
Author: User
The return value of echo. The return value of echo is verified by ajax. It is found that when PHPcodeecho & quot; a & quot;, the client alert finds that it is an array with a length of 5. the first three are empty and the first 4th are, the last one is undefined. PHPcodeecho1; the return value of echo.
The return value of echo is verified by ajax.
When
PHP code
  Echo "";

The client alert finds that it is an array of 5 characters, the first three are empty, the first 4th are a, and the last is undefined.

PHP code
  Echo 1;

When the client alert, it is found to be a 4-length array, the first three are empty, and the first 4th are 1.

You must remove spaces before matching... What is the situation?


------ Solution --------------------
The PHP file is saved as a UTF-8 without BOM format.

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.