Using Perch Custom to pull only unique items from list?

  • Is there a way to pull only unique items once?
    I have a list of properties and each has a "brand" and I want to list those brands without having duplicates show up in the "brand" list that is separate from the properties list/


    Example I have a list

    A

    A

    A

    B

    C

    C

    D

    D

    D

    But I want to output A, B, C, D

    How would I do that?

    Thanks in advance!

  • Ok, so it worked on one and I got it to work on another but now its duplicating them again.


    Here is my main template


    here are my templates where it includes the different


    PHP
    1. <perch:if different="propertybrand"><button class="btn button button-secondary" id="<perch:content id="propbrandfilter" type="composite" for="propertybrand" format="C:3">"><perch:content type="text" id="propertybrand" label="Property Brand" required></button> </perch:if>
    PHP
    1. <perch:if different="state"><button class="btn button button-secondary" id="<perch:content id="statefilter" type="composite" for="state" format="C:3" >"><perch:content id="state"></button>
    2. </perch:if>

    This is my .php page