cannot use object of type stdClass as array ——PHP

分析緣由:php js傳過來的字符串數據 .php接收後轉換爲數組對象 $output = json_decode($cc);json 結果不完全,裏面的是個字符串對象。不能使用。故而報錯:數組 Cannot use object of type stdClass as arrayspa 解決方法:code 兩種對象 使用 json_decode($d, true)。就是使json_decode
相關文章
相關標籤/搜索