title: How to get post category name in a wp-query->have_posts loop (the string only)
body: <p>I want to get the string only <code>post_category_name</code> for each post in a while <code>WP_Query()-&gt;have_posts()</code> loop. e.g.: the following.</p>
  
  <pre><code>&lt;?php while (WP_Query()-&gt;have_posts()) : ?&gt;
  
      &lt;div class="post_category_name"&gt;&lt;/div&gt;
  
  &lt;?php endwhile; ?&gt;
  </code></pre>
  
  <p>How do i get the category name for the loop, string only, without any element wrapping so i can use it as a <code>class="category"</code>.</p>
  
  <p>I've tried <code>the_category()</code> but it returns a <code>li &gt; a</code> item...</p>