php获取数组里面的值_php – 如何获取数组中对象元素的值?

我有以下数组(用于格式化的print_r):

$result = Array

(

[link] => http://www.mysite.com/article/102758

[type] => Article

[title] => Sweetbay, PepsiCo Round the Bases

[user] => pmalinowska

[date] => 1306512291

[node] => stdClass Object

(

[id] => dbcd60fee884/node/102758

[nid] => 102758

[uid] => 13208

[title] => Sweetbay, PepsiCo Round the Bases

[type] => article

[created] => 1306412903

[changed] => 1306512291

[comment_count] => 0

[name] => pmalinowska

[url] => http://www.mysite.com/article/102758

[path] => node/102758

[score] => 1.2324483

)

)

我如何获取节点元素的created属性的值?我尝试过以下方法:

$result->node->created;

$result['node']['created'];

$result->node['created']

他们都没有工作.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值