php foreach()循环数组遍历问题。求解。
[user]=>SimpleXMLElementObject([avatar]=>http://img.taobaocdn.com/sns_logo/T1GVlAXs8b...
[user] => SimpleXMLElement Object
(
[avatar] => http://img.taobaocdn.com/sns_logo/T1GVlAXs8bXXb1upjX.jpg
[buyer_credit] => SimpleXMLElement Object
(
[good_num] => 171
[level] => 5
[score] => 171
[total_num] => 171
)
[nick] => youyu63158
[sex] => SimpleXMLElement Object
(
)
)
请问我如何在 [user] 的数组下将字段为[buyer_credit]的数组遍历出来呢、怎么写详细点。。
SimpleXMLElement Object
(
[user] => SimpleXMLElement Object
(
[avatar] =>http://img.taobaocdn.com/sns_logo/T1GVlAXs8bXXb1upjX.jpg
[buyer_credit] => SimpleXMLElement Object
(
[good_num] => 171
[level] => 5
[score] => 171
[total_num] => 171
)
[nick] => youyu63158
[sex] => SimpleXMLElement Object ( )
)
)
对象里的一个数组 展开
(
[avatar] => http://img.taobaocdn.com/sns_logo/T1GVlAXs8bXXb1upjX.jpg
[buyer_credit] => SimpleXMLElement Object
(
[good_num] => 171
[level] => 5
[score] => 171
[total_num] => 171
)
[nick] => youyu63158
[sex] => SimpleXMLElement Object
(
)
)
请问我如何在 [user] 的数组下将字段为[buyer_credit]的数组遍历出来呢、怎么写详细点。。
SimpleXMLElement Object
(
[user] => SimpleXMLElement Object
(
[avatar] =>http://img.taobaocdn.com/sns_logo/T1GVlAXs8bXXb1upjX.jpg
[buyer_credit] => SimpleXMLElement Object
(
[good_num] => 171
[level] => 5
[score] => 171
[total_num] => 171
)
[nick] => youyu63158
[sex] => SimpleXMLElement Object ( )
)
)
对象里的一个数组 展开
2个回答
展开全部
你这是一个对象吧 user还是对象里的一个元素
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
把你完整的数组贴出来才行哈!
追问
SimpleXMLElement Object
(
[user] => SimpleXMLElement Object
(
[avatar] =>http://img.taobaocdn.com/sns_logo/T1GVlAXs8bXXb1upjX.jpg
[buyer_credit] => SimpleXMLElement Object
(
[good_num] => 171
[level] => 5
[score] => 171
[total_num] => 171
)
[nick] => youyu63158
[sex] => SimpleXMLElement Object ( )
)
)
对象里的一个数组
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询