title: Extracting Browser Element from User Agent
body: <p>I'm still working on the whole gathering user data from a visit thing, so I'm hung up on grabbing the actual name of the browser being used by the visitor. I have this code, but it seems that after execution, <code>$browser</code> is empty.</p>
  
  <pre><code>  $userAgent = mysql_real_escape_string($_SERVER["HTTP_USER_AGENT"]);
    $browser = get_browser($userAgent, true);
    print_r($browser);
  </code></pre>
  
  <p>What am I doing wrong here, and what steps do I take next to extract the browser from the array?</p>
  
  <p><em>EDIT</em></p>
  
  <p>Okay so now I have the following code:</p>
  
  <pre><code>  $browser = get_browser(null, true);
    $userAgent = $browser["browser"];
    $browser = mysql_real_escape_string($userAgent);
    echo $browser;
  </code></pre>
  
  <p>Which does nothing. Any insight?</p>