我使用的是谷歌电子表格API,我尝试在PHP中将对象转换为数组。无法将对象更改为数组php
请告诉我如何访问像对象或数组键,值对。谁能帮我。
在此先感谢。
Array
(
[Google\Spreadsheet\Worksheetxml] => Array
(
[id] => Array
(
[0] => https://spreadsheets.google.com/feeds/worksheets/1l5g5HbOuaDVCXb1Z3mMk7UesdJ5OOsUtGEekqDXRd-s/private/full/od6
)
[updated] => Array
(
[0] => 2017-03-01T14:18:45.232Z
)
[category] => Array
(
[@attributes] => Array
(
[scheme] => http://schemas.google.com/spreadsheets/2006
[term] => http://schemas.google.com/spreadsheets/2006#worksheet
)
)
[title] => Array
(
[0] => Sheet1
)
[content] => Array
(
[0] => Sheet1
)
[link] => Array
(
[0] => SimpleXMLElement Object
(
[@attributes] => Array
(
[rel] => http://schemas.google.com/spreadsheets/2006#listfeed
[type] => application/atom+xml
[href] => https://spreadsheets.google.com/feeds/list/1l5g5HbOuaDVCXb1Z3mMk7UesdJ5OOsUtGEekqDXRd-s/od6/private/full
)
)
[1] => SimpleXMLElement Object
(
[@attributes] => Array
(
[rel] => http://schemas.google.com/spreadsheets/2006#cellsfeed
[type] => application/atom+xml
[href] => https://spreadsheets.google.com/feeds/cells/1l5g5HbOuaDVCXb1Z3mMk7UesdJ5OOsUtGEekqDXRd-s/od6/private/full
)
)
[2] => SimpleXMLElement Object
(
[@attributes] => Array
(
[rel] => http://schemas.google.com/visualization/2008#visualizationApi
[type] => application/atom+xml
[href] => https://docs.google.com/spreadsheets/d/1l5g5HbOuaDVCXb1Z3mMk7UesdJ5OOsUtGEekqDXRd-s/gviz/tq?gid=0
)
)
[3] => SimpleXMLElement Object
(
[@attributes] => Array
(
[rel] => http://schemas.google.com/spreadsheets/2006#exportcsv
[type] => text/csv
[href] => https://docs.google.com/spreadsheets/d/1l5g5HbOuaDVCXb1Z3mMk7UesdJ5OOsUtGEekqDXRd-s/export?gid=0&format=csv
)
)
[4] => SimpleXMLElement Object
(
[@attributes] => Array
(
[rel] => self
[type] => application/atom+xml
[href] => https://spreadsheets.google.com/feeds/worksheets/1l5g5HbOuaDVCXb1Z3mMk7UesdJ5OOsUtGEekqDXRd-s/private/full/od6
)
)
[5] => SimpleXMLElement Object
(
[@attributes] => Array
(
[rel] => edit
[type] => application/atom+xml
[href] => https://spreadsheets.google.com/feeds/worksheets/1l5g5HbOuaDVCXb1Z3mMk7UesdJ5OOsUtGEekqDXRd-s/private/full/od6/-u3c64m
)
)
)
)
[Google\Spreadsheet\WorksheetpostUrl] => Array
(
[0] => Array
(
[0] => https://spreadsheets.google.com/feeds/worksheets/1l5g5HbOuaDVCXb1Z3mMk7UesdJ5OOsUtGEekqDXRd-s/private/full
)
)
)
你有什么试过的? – hassan