Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我收到为 foreach() 错误提供的无效参数。我正在使用 Bing API。包含错误的代码是。<?php foreach($obj->SearchResponse->Web->Results as $value){ ?>
<?php foreach($obj->SearchResponse->Web->Results as $value){ ?>
使用var_dump并确保它$obj->SearchResponse->Web->Results确实是一个数组。
var_dump
$obj->SearchResponse->Web->Results