title: PHP Parse error: syntax error, unexpected '}' with $_GET[] in if { }
body: <p>I have the following php-code that I don't seem to be able to get working:</p>
  
  <pre><code>&lt;?php
      if($_GET['sizex'] == null) { 
          $sizex = 200; 
      } else { 
          $sizex = $_GET['sizex']; // This is the problematic line
      }
  ?&gt;
  </code></pre>
  
  <p>When I try to run it, I get the following error:</p>
  
  <pre><code>PHP Parse error:  syntax error, unexpected '}' in test.php on line 6
  </code></pre>
  
  <p>I have found out that the $_GET[] causes this, because if I replace it with anything else like <em>$sizex = 1</em>, it works fine. Is there some typo which I cant see, or is there something special about $_GET that I don't know?<br>
  <br></p>
  
  <p>var_dump($_GET):</p>
  
  <pre><code>array(1) {
    ["sizex"]=&gt;
    string(1) "1"
  }
  </code></pre>