我有以下的PHP对象,但我努力从对象中获取数组项。在PHP对象中访问数组
exampleBatch Object (
[file_path:protected] =>
[title:protected] =>
[description:protected] =>
[link:protected] =>
[items:protected] => Array ()
[raw:protected] => data/example
[feed_nid:protected] =>
Array (
[0] => Array ([path] => data/example/example/ [filename] => file.csv)
[1] => Array ([path] => data/example/example/ [filename] => file.csv)
[2] => Array ([path] => dexampleata/example// [filename] => file.csv))
[current_item:protected] =>
[created] => 0
[updated] => 0
[total:protected] => Array ()
[progress:protected] => Array ([fetching] => 1 [parsing] => 1 [processing] => 1))
我需要访问包含三个键的数组,它是一些后处理的数据。
最好的办法是抓住数组?
看着编辑过的清理过的代码显示,您可能正在寻找'$ this-> progress'而不是'items',但是同样的方法也适用。 – Fanis 2010-09-26 08:33:54