format() format(string|array $data) : string|boolean Takes the given data and formats it. Parameters string|array $data Returns string|boolean — (XML string | false)
arrayToXML() arrayToXML(array $data, \SimpleXMLElement $output) A recursive method to convert an array into a valid XML string. Written by CodexWorld. Received permission by email on Nov 24, 2016 to use this code. Parameters array $data \SimpleXMLElement $output