Here is a slice of the array in question:
Array
(
[Pricing] => Array
(
[0] => SimpleXMLElement Object
(
[@attributes] => Array
(
[MType] => A
[PType] => JBN
)
[PSNumber] => 19753
[CCode] => USD
[EDate] => 2008-12-19
[Price] => 218.23
)
Now I want to access the values of 'Ptype' and 'Price'.
'Price' is easy $a = (float) $price_a['Pricing'][0]->Price;
But I cannot figure out 'Ptype' I have tried everything and the closest I got was $price_a['Pricing'][0]->{@attributes}
which outputs:
SimpleXMLElement Object
(
)
I am sure that this has a simple solution and I'm missing it so any help is appreciated. Thank you!