php – (utf-8) Is there a difference between string and in array string when output?-ThrowExceptions

Exception or error:

(utf-8) Is there a difference between string and in array string when output?

echo $strArray[0][0];
echo $str;
echo gettype($strArray[0][0]);
echo gettype($str);

output:

\xed\x95\x9c\xea\xb8\x80
한글
string
string

view source:

\xed\x95\x9c\xea\xb8\x80<br>한글

Normal string is good at output when echoing.
However, the string in the array is output strangely when echoing.
It’s very strange.

I finally want is decode for korean languge.
(I want Korean to be output normally.)
so I tryed:

urldecode("\xed\x95\x9c\xea\xb8\x80");
urldecode("strArray[0][0]");

output:

한글
\xed\x95\x9c\xea\xb8\x80

result is same.

So it happened in the process of sorting it into an array for regex.
I intend to use each of these data as follows:

utf-8 : [[{"\xed\x95\x9c\xea\xb8\x80": "CORS_DIV"}, "bb", "asd", "\xe3\x85\x9c\xe3\x85\x9c"], [{"NCS\xed\x95\x9c\xea\xb8\x80\xe3\x85\x9c\xe3\x85\x9c": "ww"}, "qq", "432", "asd"]]

korean lang : result = [[{'한글' : 'CORS_DIV'}, 'bb', 'asd', 'ㅜㅜ'],[{'NCS한글ㅜㅜ' : 'ww'}, 'qq', '432', 'asd']]

thanks you for reading…..

How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *