How do I get an array containing only unique elements from multiple arrays?

Hi,

Below is the output of my code that shows an array with each of its element holding array of unique elements. I want to now get a new array out of this output which will contain unique elements. This means I need to get a single dimensional array with unique elements from the output like.

array ([0] => Atomizers, [1] => Bathroom Accessories and Sprays)

and so on . Thank you. Final array shouldn’t have any duplicates

Array
(
    [Product ID:8211684524336] => Array
        (
            [0] => Atomizers and Sprays
            [1] =>  Bath Hardware
            [2] =>  Bathroom Accessories
            [3] =>  Cristal&Bronze
            [4] =>  Cristallin - Smooth
            [5] =>  finish_chrome-gold
            [6] =>  finish_crystal-gold
            [7] =>  finish_gold-patina
            [8] =>  finish_lacquered-polished-brass
            [9] =>  finish_matte-antique-bronze
            [10] =>  finish_matte-chrome
            [11] =>  finish_matte-copper
            [12] =>  finish_matte-nickel
            [13] =>  finish_matte-pewter-style
            [14] =>  finish_matte-unlacquered-silver
            [15] =>  finish_medal-bronze
            [16] =>  finish_nickel-gold
            [17] =>  finish_polished-antique-brass
            [18] =>  finish_polished-chrome
            [19] =>  finish_polished-copper
            [20] =>  finish_polished-gold
            [21] =>  finish_polished-gold-3-microns
            [22] =>  finish_polished-nickel
            [23] =>  finish_polished-pewter-style
            [24] =>  finish_polished-velvet-chrome
            [25] =>  finish_rose-gold
            [26] =>  finish_unlacquered-brass
            [27] =>  finish_unlacquered-silver
            [28] =>  finish_velvet-chrome
            [29] =>  finish_velvet-gold
            [30] =>  type_large-q-tip-jar
            [31] =>  type_room-spray
        )

    [Product ID:8211639533872] => Array
        (
            [0] => finish_a1-polished-chrome
            [1] =>  finish_a2-polished-nickel
            [2] =>  finish_a3-unlacquered-brass
            [3] =>  finish_a4-polished-copper
            [4] =>  finish_b1-matte-chrome
            [5] =>  finish_b10-matte-copper-patina
            [6] =>  finish_b11-matte-antique-brass
            [7] =>  finish_b3-matte-nickel
            [8] =>  finish_b4-lacquered-polished-brass
            [9] =>  finish_b5-polished-antique-brass
            [10] =>  finish_b6-matte-copper
            [11] =>  finish_b7-polished-antique-copper
            [12] =>  finish_b8-matte-antique-copper
            [13] =>  finish_b9-polished-copper-patina
            [14] =>  finish_c10-polished-antique-bronze
            [15] =>  finish_c11-polished-black-bronze
            [16] =>  finish_c12-matte-black-bronze
            [17] =>  finish_c13-polished-soft-gold
            [18] =>  finish_c2-matte-antique-bronze
            [19] =>  finish_c3-medal-bronze
            [20] =>  finish_c4-polished-pewter-style
            [21] =>  finish_c5-matte-pewter-style
            [22] =>  finish_d1-polished-gold
            [23] =>  finish_d3-matte-soft-gold
            [24] =>  finish_e1-polished-gold-3-microns
            [25] =>  finish_e2-velvet-gold
            [26] =>  finish_e3-gold-patina
            [27] =>  finish_e5-unlacquered-silver
            [28] =>  finish_e6-matte-unlacquered-silver
            [29] =>  finish_e7-matte-gold
            [30] =>  magnification_3x
            [31] =>  magnification_5x
            [32] =>  Makeup Mirrors
            [33] =>  Makeup Mirrors - Wall-Mounted Non-Lighted
            [34] =>  Miroir Brot
        )

    [Product ID:8300518277424] => Array
        (
            [0] => Alfi Brand
            [1] =>  Medicine Cabinets
        )

    [Product ID:8211560235312] => Array
        (
            [0] => Kimball and Young
            [1] =>  magnification_5x
            [2] =>  Makeup Mirrors
            [3] =>  Makeup Mirrors  - Free Standing Lighted
            [4] =>  Makeup Mirrors - Free Standing
        )

    [Product ID:8211619086640] => Array
        (
            [0] => Bath Hardware
            [1] =>  Bathroom Accessories
            [2] =>  finish_brushed-black-chrome
            [3] =>  finish_brushed-nickel
            [4] =>  finish_polished-chrome
            [5] =>  Keuco
            [6] =>  Keuco Edition 400
            [7] =>  Soap Dishes
        )

)

I could solve it myself with the following PHP code. Thanks to all who might have wanted to help

<

$consolidated_product_tags = array_unique(array_merge($consolidated_product_tags, array_map(‘trim’, explode(“,”, $shopify_product_info[‘tags’]))));