title: Wordpress - Get Current Category Parents
body: <p>In category.php, how would I test against a category having a parent category?</p>
  
  <p>If the parent category is A, and the sub-category is B, and the user loads the URL for category B, I would like to be able to test if it has parent A, and run code if it does.</p>
  
  <p>I've found the get_category_parents tag, but it seems to return a link list rather than an array:</p>
  
  <pre><code>get_category_parents($cat, TRUE, ', '));
  </code></pre>
  
  <p>Even if I got the array, I'm not sure what the php function is to test against it (php noob).</p>
  
  <p>Thanks!</p>