Result ordered from A to Z

0

I have a query, which I imagine is in object-oriented php, which in my case I'm starting to study (I know I'm late).

I have a Xtech platform, and at the time of displaying some features, I have the following code

{% if product.properties|count > 0 %}
                        <div class="clearfix">
                            {% for prop in product.properties %}
                                {% if properties_flatten[prop.id].image is not empty %}
                                    <img src="{{ host_url("uploads/images/small/" ~ properties_flatten[prop.id].image) }}">
                                {% else %}
                                    <h5>{{ properties_flatten[prop.id].excerpt }} {{ properties_flatten[prop.id].name }}</h5>
                                {% endif %}

                            {% endfor %}
                        </div>
{% endif %}

This code displays the product characteristics, Color: White, Black, Blue, Red.

I would like to put the result alphabetically.

Blue, White, Black.

But I do not know how to do this in this kind of object orientation.

Please if anyone knows and can help.

I'm sorry if I'm talking bullshit.

Thank you

    
asked by anonymous 19.03.2018 / 17:52

0 answers