How to convert php multidimensional array to json format?

Array printout is such a format, how to convert this format to json format?
Array (
[0] = >
Array ([0] = > all [1] = > 2017-2018-2 [2] = > Information Engineering Department [3] = > computer Network Technology [4] = > Liu Yu)
[1] = >
Array ([0] = > all [1] = > 2017-2018-2 [2] = > Information Engineering Department [3] = > computer Network Technology [4] = > Zhang Li)
)

Php
Mar.26,2021

directly json_encode ($arr) is fine, and then the encoding must be


read more documents


json_encode (" array ", JSON_UNESCAPED_UNICODE); Directly into the json array, Chinese do not transcode


the above answer, Chinese non-garbled code is only when the web page is displayed, but json who will be displayed on the web page. They are all used after json_decode. So there's no problem. There is no need to deal with it that way.

Menu