我如何从这个数组(stdClass)php中获取数据?
我如何从这个数组(stdClass)php中获取数据?
Array
(
[0] => stdClass Object
(
[id] => 4
[programs] => FireFox
[version] => 4.00
[type] => Browsers
[description] => fdmkfdsf,sdfdsfdsfdsf
dfdsf
sd
f
dsf
ds
f
[views] => 2
[serial] => 434343-343434-3434-c
)
)
当我尝试使用 foreach 获取它时,我收到了错误
#
A PHP Error was encountered
Severity: 4096
Message: Object of class stdClass could not be converted to string
Filename: views/results.php
Line Number: 2
如何获取程序的数据(例如 FireFox)?
how can i fetch data from this array (stdClass) php??
Array
(
[0] => stdClass Object
(
[id] => 4
[programs] => FireFox
[version] => 4.00
[type] => Browsers
[description] => fdmkfdsf,sdfdsfdsfdsf
dfdsf
sd
f
dsf
ds
f
[views] => 2
[serial] => 434343-343434-3434-c
)
)
when i tried to fetch it using foreach i got that error
#
A PHP Error was encountered
Severity: 4096
Message: Object of class stdClass could not be converted to string
Filename: views/results.php
Line Number: 2
How can i get the data of the program(e.g FireFox)??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您想使用此
$data
作为数组,那么您应该将其更改为If you want to use this
$data
as array then you should change it as