diff --git a/src/Thujohn/Rss/Rss.php b/src/Thujohn/Rss/Rss.php index e0fa690..b1e69f1 100644 --- a/src/Thujohn/Rss/Rss.php +++ b/src/Thujohn/Rss/Rss.php @@ -117,7 +117,14 @@ public function render() } else { - $elem_item->addChild($options[0], $vI); + if (is_array($vI)) { + $item_child = $elem_item->addChild($options[0]); + foreach ($vI as $key => $value) { + $item_child->addAttribute($key, $value); + } + } else { + $elem_item->addChild($options[0], $vI); + } } } }