title: Parse error: syntax error, unexpected '$os' (T_VARIABLE) PHP Error
body: <p>I'm using the following code to try and print the operating system of the user:</p>
  
  <p>Header:</p>
  
  <pre><code>&lt;?php
  $user_agent = getenv("HTTP_USER_AGENT");
  
  if (strpos($user_agent, "Win") !== FALSE)
  $os = "Windows"; 
  else (strpos($user_agent, "Mac") !== FALSE)
  $os = "Mac";
  ?&gt;
  </code></pre>
  
  <p>Body:</p>
  
  <pre><code>&lt;?php
  if($os = "Windows")
  {
  
  }
  elseif($os == "Mac")
  {
  
  } 
  ?&gt;
  </code></pre>
  
  <p>I get the error</p>
  
  <blockquote>
    <p>Parse error: syntax error, unexpected '$os' (T_VARIABLE) in C:\xampp\xamppfile\htdocs\ProjectSite\includes\identifier.php on line 7</p>
  </blockquote>