title: How to get css ID from product category name in Wordpress
body: <p>I'm using woocommerce as a catalog. I want to give css id each product category from category id. Because i want to make "display:none" in some where.</p>
  
  <p><strong>My codes looking in Chrome console like this:</strong></p>
  
  <pre><code>&lt;div class="woo-category"&gt;
    &lt;span&gt;
      &lt;a href="http://www.yazicimakina.com.tr/?product_cat=overlap" rel="tag"&gt;Overlap&lt;/a&gt;
      ","
      &lt;a href="http://www.yazicimakina.com.tr/?product_cat=tam" rel="tag"&gt;TAM&lt;/a&gt;
      ","
      &lt;a href="http://www.yazicimakina.com.tr/?product_cat=tumu" rel="tag"&gt;TÜMÜ&lt;/a&gt;
    &lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>My PHP codes:</strong></p>
  
  <pre><code>&lt;div class="woo-category"&gt;
    &lt;?php
      $postid = get_the_ID();
      $categories = get_the_term_list($postid, 'product_cat', '', ', ', '');
      ?&gt;
      &lt;span&gt;&lt;?php print_r($categories); ?&gt;&lt;/span&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p><strong>I want to:</strong></p>
  
  <pre><code>&lt;div class="woo-category"&gt;
    &lt;span&gt;
      &lt;a id="example1" href="http://www.yazicimakina.com.tr/?product_cat=overlap" rel="tag"&gt;Overlap&lt;/a&gt;
      ","
      &lt;a id="example2" href="http://www.yazicimakina.com.tr/?product_cat=tam" rel="tag"&gt;TAM&lt;/a&gt;
      ","
      &lt;a id="example3" href="http://www.yazicimakina.com.tr/?product_cat=tumu" rel="tag"&gt;TÜMÜ&lt;/a&gt;
    &lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I think way is: print to category id as a css id but I don't know how can i do that in PHP.</p>