diff --git a/src/ArrayToXml.php b/src/ArrayToXml.php index 7853eef..9e0fde0 100644 --- a/src/ArrayToXml.php +++ b/src/ArrayToXml.php @@ -306,7 +306,7 @@ protected function createRootElement(string|array $rootElement): DOMElement continue; } - $this->addAttributes($element, $rootElement[$key]); + $this->addAttributes($element, $value); } return $element;