JSON を使用していくつかのデータを取得しました。次に、json_decode() を使用して結果を PHP 配列に変換しました。今、私は何らかの価値を得ようとしています。通知を受け取っています。
$html = $curl->get($url); // $html contains json result
$result = json_decode($html); //converting to php array
//the output is something like this
{
"query":
"results":{
"Result":[
{
"BusinessUrl":"http://www.aplus.net/",
-----------
------------
}]
}
さて、このようにビジネス URL を取得しようとすると
$result->query->results->Result[0]->BusinessUrl
次のような通知を提供します
Notice: Trying to get property of non-object
これで私を助けてください。