diff --git a/src/LukeSnowden/GoogleShoppingFeed/Feed.php b/src/LukeSnowden/GoogleShoppingFeed/Feed.php index bfef7e1..111b735 100644 --- a/src/LukeSnowden/GoogleShoppingFeed/Feed.php +++ b/src/LukeSnowden/GoogleShoppingFeed/Feed.php @@ -265,6 +265,21 @@ public function categoriesAsSelect($selected = '', $languageISO639 = 'gb') return $select; } + /** + * @param string $languageISO639 + * @return array + */ + public function categoriesAsNameAssociativeArray( $languageISO639 = 'gb' ) + { + $categories = $this->categories($languageISO639); + unset($categories[0]); + $return = []; + foreach( $categories as $key => $value ) { + $return[$value] = $value; + } + return $return; + } + /** * Generate RSS feed * @param bool $output