json_encode is returning NULL?

前端 未结 10 2041
[愿得一人]
[愿得一人] 2020-11-22 12:22

For some reason the item \"description\" returns NULL with the following code:



        
10条回答
  •  说谎
    说谎 (楼主)
    2020-11-22 12:33

    You should pass utf8 encoded string in json_encode. You can use utf8_encode and array_map() function like below:

    
    

提交回复
热议问题