We need to improve our programming ideas through continuous accumulation of experience, and use it flexibly characters. The problem is that the returned characters are GB2312, how to change them into UTF-8, and it is best to convert the entire array to UTF-8. After searching, the following code is found to solve the problem of PHP server returning Json:
function encodeUTF8($array)We need to improve our programming ideas through continuous accumulation of experience. We can only know after reading the json_encode document after using it flexibly. , it can only encode UTF-8 characters. The problem is to return...
<ol class="dp-xml"><li class="alt"><span><span>echo '{"total":"'.$rscount.'<br>","results":'.json_encode<br>(encodeUTF8($result)).'}'; </span></span></li></ol>