title: Unexpected T_ELSE error in PHP
body: <p>I am working on an example from a php book and am getting an error on line 8 with this code</p>
  
  <pre><code>&lt;?php
  
  $agent = getenv("HTTP_USER_AGENT");
  if (preg_match("/MSIE/i", "$agent"));
  {
      $result = "You are using Microsoft Internet Explorer";
  }
  else if (preg_match("/Mozilla/i", "$agent")); 
  {
      $result = "You are using Mozilla firefox";
  }
  else {$result = "you are using $agent"; }
  
  echo $result;
  
  
  ?&gt;
  </code></pre>