1. 程式人生 > >php json_encode json_decode 操作中文字元

php json_encode json_decode 操作中文字元

對應json字串,需要用方法:iconv('gbk', 'utf-8', $user_datas);(未使用時,json_decode 得到空的結果)

陣列成員含有中文字元時,同樣用iconv('gbk', 'utf-8', $user_datas);進行過濾(未使用時,json_encode 會將中文轉換成null)