Как перебрать объект SimpleXMLElement?
Вот что у меня есть:
Я пытался разными способами повторить, но безуспешно:
SimpleXMLElement Object
(
[products] => SimpleXMLElement Object
(
[product] => Array
(
[0] => SimpleXMLElement Object
(
[product_name] => PROD1
[price] => 100.2
[has_special_price] => true
[special_price_desc] => DESC SPECIAL PRICE
[id_product_remote] => CUSTOMID-01
[decimals] => 0
[category_key] => 1
[packaging_key] => 2
[stock_type_key] => 1
)
[1] => SimpleXMLElement Object
(
[product_name] => PROD2
[price] => 200.2
[has_special_price] => false
[special_price_desc] => DEsdSC SPECIAL PRICE
[id_product_remote] => CUSTOMID-02
[decimals] => 0
[category_key] => 1
[packaging_key] => 2
[stock_type_key] => 1
)
)
)
[products_client] => SimpleXMLElement Object
(
[product_client] => Array
(
[0] => SimpleXMLElement Object
(
[id_client_remote] => CUSTOMCLIENT-01
[id_product_remote] => CUSTOMID-01
[custom_price] => 0
)
[1] => SimpleXMLElement Object
(
[id_client_remote] => CUSTOMCLIENT-02
[id_product_remote] => CUSTOMID-02
[custom_price] => 1
)
)
)
)