json_decode對JSON格式的字元串進行編碼而json_encode對變數進行 JSON 編碼,需要的朋友可以參考下 ... 可以看出 json_decode($data,true)輸出的一個關聯數組,由此可知json_decode($data)輸出的是對象,而json_decode("$arr",true)是把它強制生成PHP關聯數組.
www.jb51.net