且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

为foreach()提供的JSON无效参数

更新时间:2023-11-30 23:11:40

您需要明确地转向 json_decode 输出到数组。像这样:

You need to explicitly turn json_decode output to an array. Like this:

$koyim = (array)json_decode($json);

我遇到了与您完全一样的问题,这解决了我的问题。

I had exactly same issue like yours and this resolved my issue.