Mi sapreste dire come posso fare per recupereare le [key] di un'array creato con la funzione simplexml_load_file?
in pratica mi servirebbe raggiungere e estrarre gli indici dell'array contenuto in [Day] : [0] [1] [2] [3] [4] [5] , il tutto dovrebbe avvenire in un ciclo.
:help::help:
Codice:
SimpleXMLElement Object
(
[Day] => Array
(
[0] => SimpleXMLElement Object
(
[@attributes] => Array
(
[Num] => 4553
)
[Date] => 220412
[Energy] => 2
)
[1] => SimpleXMLElement Object
(
[@attributes] => Array
(
[Num] => 4553
)
[Date] => 170612
[Energy] => 403
)
[2] => SimpleXMLElement Object
(
[@attributes] => Array
(
[Num] => 4554
)
[Date] => 180612
[Energy] => 1500
)
[3] => SimpleXMLElement Object
(
[@attributes] => Array
(
[Num] => 4555
)
[Date] => 220412
[Energy] => 2
)
[4] => SimpleXMLElement Object
(
[@attributes] => Array
(
[Num] => 4556
)
[Date] => 170612
[Energy] => 403
)
[5] => SimpleXMLElement Object
(
[@attributes] => Array
(
[Num] => 4557
)
[Date] => 180612
[Energy] => 1500
)
)
)
in pratica mi servirebbe raggiungere e estrarre gli indici dell'array contenuto in [Day] : [0] [1] [2] [3] [4] [5] , il tutto dovrebbe avvenire in un ciclo.
:help::help: