Hello,
I'm trying to extract data from an XML file with some of the data I require nested into a tag, so I am using SimpleXML PHP feature.
The data is then placed into an array format when using xpath() function, yet the information I require is on the forth array for starters (Reference, Name) and then on the third array (Quantity).
As you can see below, there could be several of these array's that I want to extract the data from.
Has anyone got any ideas how I can extract this data as I am struggling to find a solution.
Array
(
[0] => SimpleXMLElement Object
(
[Product] => Array
(
[0] => SimpleXMLElement Object
(
[@attributes] => Array
(
[SID] => 1
[Reference] => 40
[Name] => Camera A
)
[Quantity] => 1
[QDQualify] => 1
)
[1] => SimpleXMLElement Object
(
[@attributes] => Array
(
[SID] => 10
[Reference] => 36
[Name] => Camera B
)
[Quantity] => 1
[QDQualify] => 1
)
[2] => SimpleXMLElement Object
(
[@attributes] => Array
(
[SID] => 10
[Reference] => 38
[Name] => Camera C
)
[Quantity] => 1
[QDQualify] => 1
)
)
)
)
Regards,
Rich