Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function updateAction()
- {
- $id = $_GET['id'];
- $value = $_GET['name'];
- $xml = new SimpleXMLElement('data/test.xml', null, true);
- $result = $xml->xpath('//level[@id="' . $id . '"]');
- $result[0]['name'] = $value;
- $xml->asXml("data/test.xml");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement