For more information about PHP loop output garbled characters
Source: Internet
Author: User
For PHP loop output garbled characters, please refer ~ Recently I tried to use TP as a website, but it encountered a very strange problem: for example, when I print an Array with print_r, Array ([id] = & gt; 3 [title] = & gt; A golden holiday trip to Beijing), but when using volist or foreeach for output, Chinese characters are garbled. please give me some advice ~~ In addition, the front-end and back-end questions about PHP loop output garbled characters ~
Recently I tried to use TP as a website, but there was a strange problem: for example, when print_r is used to print an Array, Array ([id] => 3 [title] => Golden holiday Beijing trip). However, when volist or foreeach is used for output, Chinese characters are garbled, thank you for your advice ~~
In addition, both the front-end and back-end files use UTF-8, and there should be no different encodings.
------ Solution --------------------
Volist or foreeach requires that the input is a two-dimensional array. Please check
------ Solution --------------------
If the file format is UTF-8
Add a sentence Try
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