使用print_r($data)输出结果为

Array
(
[0] => stdClass Object
(
[color_item_no] => 1
[color_name] => sdf
[size_item_no] => 1
[size] => S
[jar_no] => 45
[qty] => 45
[stand_wgt] =>
[qty_unit] => 1
) [1] => stdClass Object
(
[color_item_no] => 1
[color_name] => sdf
[size_item_no] => 2
[size] => M
[jar_no] => 45
[qty] => 45
[stand_wgt] =>
[qty_unit] => 1
)
)

这种情况下一般使用任何框架原本的输出方法可能都会出错,比如laravel框架中 echo $data[0]['qty'];会报stdClass Object这个问题,那么这个时候就$data[0]->qty就可以了。

最新文章

  1. 谈谈一些有趣的CSS题目(三)-- 层叠顺序与堆栈上下文知多少
  2. 从零开始学 Java - Spring 支持 CORS 请求踩的坑
  3. hdu 1097 A hard puzzle
  4. win平台检查内存泄露
  5. Oracle VM VirtualBox虚拟机安装系统
  6. Secant Method (Website)
  7. PHP对象类型在内存中的分配
  8. linux/unix运行级别
  9. 个人信用卡管理 - iOS UI原型
  10. Java学习笔记之接口和抽象类
  11. MySQL解决"is marked as crashed and should be repaired"故障
  12. redhat 6 红帽6 Linux 网络配置
  13. 鉴权完成后如何拿到SpringSocial的用户信息
  14. Rsync + Sersync 实现数据增量同步
  15. JS字符串常用方法总结
  16. [xdoj] 1310 DSKer的卡牌游戏
  17. SQL Server 数值四舍五入,小数点后保留2位
  18. spring cloud 知识点
  19. JSON数据生成树——(四)
  20. FocusBI: SSIS体系结构(原创)

热门文章

  1. C++ map的方法
  2. docker的安装教程
  3. Python爬虫实例(四)网站模拟登陆
  4. :after和:before 伪类
  5. RoR- Database setup& SQLite ... Migrations
  6. python类型错误:'NoneType' object is not subscriptable
  7. 15.IEnumerable和IEnumerator
  8. Java作业(一)
  9. linux 下tftpf搭建
  10. Go 初体验 - 死锁的几种情况