Question

My object is this:

Array ( [data] => [attribs] => Array ( [] => Array ( [version] => 2.0 ) ) [xml_base] => [xml_base_explicit] => [xml_lang] => [child] => Array ( [] => Array ( [channel] => Array ( [0] => Array ( [data] => [attribs] => Array ( ) [xml_base] => [xml_base_explicit] => [xml_lang] => [child] => Array ( [] => Array ( [title] => Array ( [0] => Array ( [data] => Il Fatto Quotidiano [attribs] => Array ( ) [xml_base] => [xml_base_explicit] => [xml_lang] => ) ) [link] => Array ( [0] => Array ( [data] => http://www.ilfattoquotidiano.it [attribs] => Array ( ) [xml_base] => [xml_base_explicit] => [xml_lang] => ) ) [description] => Array ( [0] => Array ( [data] => News, inchieste e blog su politica, cronaca, giustizia, economia [attribs] => Array ( ) [xml_base] => [xml_base_explicit] => [xml_lang] => ) ) [lastBuildDate] => Array ( [0] => Array ( [data] => Thu, 31 Oct 2013 22:31:07 +0000 [attribs] => Array ( ) [xml_base] => [xml_base_explicit] => [xml_lang] => ) ) [language] => Array ( [0] => Array ( [data] => it [attribs] => Array ( ) [xml_base] => [xml_base_explicit] => [xml_lang] => ) ) [generator] => Array ( [0] => Array ( [data] => http://wordpress.org/?v=3.2.1 [attribs] => Array ( ) [xml_base] => [xml_base_explicit] => [xml_lang] => ) ) [item] => Array ( [0] => Array ( [data] => [attribs] => Array ( ) [xml_base] => [xml_base_explicit] => [xml_lang] => [child] => Array ( [] => Array ( [title] => Array ( [0] => Array ( [data] => Amianto su navi della Marina Militare, 14 a processo: anche capi di stato maggiore [attribs] => Array ( ) [xml_base] => [xml_base_explicit] => [xml_lang] => ) ) [link] => Array ( [0] => Array ( [data] => http://www.ilfattoquotidiano.it/2013/10/31/amianto-su-navi-della-marina-militare-14-a-processo-anche-capi-di-stato-maggiore/763186/ [attribs] => Array ( ) [xml_base] => [xml_base_explicit] => [xml_lang] => ) ) [comments] => Array ( [0] => Array ( [data] => http://www.ilfattoquotidiano.it/2013/10/31/amianto-su-navi-della-marina-militare-14-a-processo-anche-capi-di-stato-maggiore/763186/#comments [attribs] => Array ( ) [xml_base] => [xml_base_explicit] => [xml_lang] => ) ) [pubDate] => Array ( [0] => Array ( [data] => Thu, 31 Oct 2013 21:35:56 +0000 [attribs] => Array ( ) [xml_base] => [xml_base_explicit] => [xml_lang] => ) ) [category] => Array ( [0] => Array ( [data] => Giustizia & impunità [attribs] => Array ( ) [xml_base] => [xml_base_explicit] => [xml_lang] => ) [1] => Array ( [data] => Amianto [attribs] => Array ( ) [xml_base] => [xml_base_explicit] => [xml_lang] => ) [2] => Array ( [data] => Marina Militare [attribs] => Array ( ) [xml_base] => [xml_base_explicit] => [xml_lang] => ) [3] => Array ( [data] => Osservatorio Nazionale Amianto [attribs] => Array ( ) [xml_base] => [xml_base_explicit] => [xml_lang] => ) [4] => Array ( [data] => Padova [attribs] => Array ( ) [xml_base] => [xml_base_explicit] => [xml_lang] => ) ) [guid] => Array ( [0] => Array ( [data] => http://www.ilfattoquotidiano.it/?p=763186 [attribs] => Array ( [] => Array ( [isPermaLink] => false ) ) [xml_base] => [xml_base_explicit] => [xml_lang] => ) ) [description] => Array ( [0] => Array ( [data] => Il gup del tribunale di Padova ha rinviato a giudizio 14 persone che, a vario titolo, hanno fatto parte dei vertici della Marina Militare durante gli anni Ottanta e Novanta. Sulle navi della Marina c’era l’amianto ma, secondo l’accusa, per decenni, chi sapeva del pericolo non ha detto o fatto nulla mettendo in pericolo la... [attribs] => Array ( ) [xml_base] => [xml_base_explicit] => [xml_lang] => ) ) ) [http://purl.org/dc/elements/1.1/] => Array ( [creator] => Array ( [0] => Array ( [data] => Luca Teolato [attribs] => Array ( ) [xml_base] => [xml_base_explicit] => [xml_lang] => ) ) ) [http://purl.org/rss/1.0/modules/content/] => Array ( [encoded] => Array ( [0] => Array ( [data] =>............eccecc

I have to access to category element:

How can I do?

Thank you.

Was it helpful?

Solution

if that is a simplepie class instance you should be able to use ->get_categories() , as suggested in the manual : http://simplepie.org/api/class-SimplePie.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top