[乐意黎原创]php 抛Fatal error: Cannot use object of type stdClass as array in XXX的解决方法
2016-04-28 10:10
519 查看
php 使用 var_dump( $curDayItemsJson["comm_msg_info"]);
抛Fatal error: Cannot use object of type stdClass as array in 错误,如图:
items: 10
<b>Fatal error</b>: Cannot use object of type stdClass as array in <b>E:\PHPCMS\Cms\www.aerchi.com\weixin\weixin-search.php</b> on line <b>490</b>
其实,数组中是返回的是一个对象,不能直接用[]来显示,正确的输出方法是: $curDayItemsJson->comm_msg_info
终于成功解决,标记一下。
乐意黎原创
本文地址: http://blog.csdn.net/aerchi/article/details/51272067
抛Fatal error: Cannot use object of type stdClass as array in 错误,如图:
items: 10
<b>Fatal error</b>: Cannot use object of type stdClass as array in <b>E:\PHPCMS\Cms\www.aerchi.com\weixin\weixin-search.php</b> on line <b>490</b>
其实,数组中是返回的是一个对象,不能直接用[]来显示,正确的输出方法是: $curDayItemsJson->comm_msg_info
终于成功解决,标记一下。
乐意黎原创
本文地址: http://blog.csdn.net/aerchi/article/details/51272067
相关文章推荐
- Xcode插件管理工具CocoaPods安装教程
- Objective-C中字符串NSString的常用操作方法总结
- [Angular 2] Using a Reducer to Change an Object's Property Inside an Array
- different object with the same identifier value was already associated with the session 问题解决
- Objective-C中的block代码块的使用
- 2.Samba安装问题:error while loading shared libraries: libXXX.so.X: cannot open shared object file
- Object-c------self
- ClassNotFoundException: com.fasterxml.jackson.databind.ObjectMapper的解决办法
- Object-c-----类方法
- 泛型与Object
- Foundation => Objective-C _ Part6
- jenkins部署war 报错required: java.lang.Long found: java.lang.Object
- 【Realflow】Objects - Volume节点翻译
- 开发工具、Object类(java基础知识十一)
- Foundation => Objective-C _ Part5
- 【Android数据传递】Intent传递List和Object和List<Object>(附源码)
- Objective-C:属性(@property)
- TypeError: 'stepUp' called on an object that does not implement interface HTMLInputElement.
- 不常用的 IO 流对象:ObjectInputStream/ObjectOutputStream
- objective-c 基础框架 属性列表等