I parsed a XML file with SimepleXML:
<element data="abc,def">
EL
</element>
But now I want to append something to the "data" attribute. Not in the file, but in my variables (in the object structure that I got from simplexml_load_file).
How can I do that?
Use this corrected....
Exemple :
result:
Untested, but should work:
You can use this function (if no namespaces):
Well, it can be done like
$element['data'] .= ',ghi';