PHP | SimpleXMLElement addChild() Function
Pre-requisite: Read XML Basics The SimpleXMLElement::addChild() function is an inbuilt function in PHP which is used to add a child in a SimpleXML object. Syntax: SimpleXMLElement SimpleXMLElement::addChild($name, $value, $namespace); Parameter: This function accepts three parameters as mentioned ab