数组转json函数 $jsonstr = json_encode($arr); json转数组 arr_1 = json_decode($jsonstr, true); json转对象 $arr_2 = json_decode($jsonstr);