I found (here) an answer regarding the way to delete a node of a SimpleXMLElement object.
The problem is I can not really understand how is that happening.
I mean, that $image var is a ref, right? So, what and where it is that $image[0][0]?
SimpleXMLElement presents an array-like interface on its child nodes via magic methods. This behavior is because of custom __unset behavior that causes the SimpleXMLElement to act as though a "member" (child element) of its "array" (set of child elements) has been removed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With