2017-02-05 43 views
0

我有一個數組像這樣警告:非法串偏移「OperationRequest」中:在josn/PHP錯誤

{"OperationRequest":{"RequestId":"5b7ebeb4-2216-407b-8c01-3040d9291621", 
    ... 
    ... 
    ... 

我使用這個PHP代碼,以顯示數據

echo $prTitle = $json['OperationRequest']['RequestIds']; 

但是顯示警告信息

Warning: Illegal string offset 'OperationRequest' in C:\xampp\htdocs\folder/file.php on line 46 

以任何最佳方式幫助我。

+1

$ json-> OperationRequest-> RequestId?您正在使用** RequestId **,而不是** RequestId **。另外,如果你發佈了更多的代碼,它會有所幫助。 – user2182349

回答

0

我買了上述意見後幫助解決由「user2182349

我使用此代碼$json->OperationRequest->RequestId,而不是現在$json['OperationRequest']['RequestIds']其工作的罰款。

相關問題