PHP output of strange related problems Ah! Ask God to help me look at my little brother. Strange characters that I haven't seen in a day

Source: Internet
Author: User
PHP output strange problem Ah!!! Ask God for help look at the weird characters I've been looking at for a day without knowing where to look.
First I started learning PHP and wrote a process of outputting json after reading from the database.

It looks like the result is right. And then I went to a check site to prompt me 
So I looked for a long reason to find that I do not know where to come in front of the string there are 4 of inexplicable things ...

Excuse me, where is this coming from? = = How do I get rid of it ...
Function index ()
{
$CC =new Demodao ();
$resu = $CC->index ();
$json =json_encode ($resu);
$json =urldecode ($json);
$total = 24;
$json = "{". ' " Total "'.": $total, ". '" Rows "'.": ". $json."} ";
Echo $json;
}
The final output of the JSON

Ask the great God to help me see ~!!!!!!!!!!!! The codes are all utf-8.
------to solve the idea----------------------
is obviously BOM header
  • 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.