How to print unique div id using php or twig

hello
I want to print unique div id for each time it prints the value

{% if images %}
 {% for image in images %}
        <li data-thumb="{{ image.thumb }}"> 
           <img id="here_unique_id_goes" src='{{ image.thumb }}'  data-image="{{ image.thumb }}" title="{{ heading_title }}" alt="{{ heading_title }}" class="img-responsive"/>
        </li>
 {% endfor %}
{% endif %}

Thanks

And what would you actually do with this unique id? Not much point in applying an id unless you later try doing some sort of javascript query on it. In which case your javascript code would also need to know the id?

Understanding the intended usage of the id will make it easier to suggest how to generate one. If indeed it make sense to do so.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.