我有以下的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