title: How do I check for a tag's existence in a post in Wordpress?
body: <p>Quick question about Wordpress PHP: 
  I am writing a theme and I want to display (on the main index page) one icon if my post has one tag, and another if it has the other.</p>
  
  <p>I wrote something like</p>
  
  <pre><code>&lt;?php has_tag('pc') { ?&gt;&lt;img src="&lt;?php bloginfo('template_directory'); ?&gt;/images/pc-icon.gif"&gt;&lt;?php }; ?&gt;
  &lt;?php has_tag('mb') { ?&gt;&lt;img src="&lt;?php bloginfo('template_directory'); ?&gt;/images/mb-icon.gif"&gt;&lt;?php }; ?&gt;
  </code></pre>
  
  <p>But it gives me an error. Can anybody help?</p>
  
  <p>Thanks</p>