菜单切换
FACESOHO知行者
心灵
记录
远方
赞赏工具
源代码
运行
保存
Tove
Jani
Reminder
Don't forget me this weekend! XML; $xml=new SimpleXMLElement($note); // Add a child element to the body element $xml->body->addChild("date","2013-01-01"); // Add a child element after the last element inside note $footer=$xml->addChild("footer","Some footer text"); echo $xml->asXML(); ?>
Select View Source to see the added date element (inside the body element) and the footer element.
运行结果