Possible Duplicate:
A simple program to CRUD node and node values of xml file
Hi i have xml file with following attributes
<user>
<info>
<id>XXXXXX</id>
</info>
</user>
I want to replace user id every time when the page loads and then save file with new id, the variable which gets id from user is $uid.
DOMDocument( php.net/manual/en/class.domdocument.php ) orSimpleXML( php.net/manual/en/book.simplexml.php ) manual.str_replaceto insert the values then replace the file, else you would need to xpath the node and then rebuild the xml