title: How do I see if a user agent is chrome or firefox?
body: <p>I want to tell if the user agent used to access my page is chrome or firefox. I found a list of <a href="http://www.useragentstring.com/pages/Chrome/" rel="nofollow">chrome user agents</a> however the list is <strong>huge</strong> and I don't want to write:</p>
  
  <pre><code>if ($_SERVER['HTTP_USER_AGENT'] == "agent1" | $_SERVER['HTTP_USER_AGENT'] == "agent 2")...
  </code></pre>
  
  <p>and I feel there's <em>probably</em> a more efficient way to do so. What should I try?</p>