title: How to verify if $_GET exists?
body: <p>So, I have some PHP code that looks a bit like this:</p>
  
  <pre><code>&lt;body&gt;
      The ID is 
  
      &lt;?php
      echo $_GET["id"] . "!";
      ?&gt;
  
  &lt;/body&gt;
  </code></pre>
  
  <p>Now, when I pass an ID like <code>http://localhost/myphp.php?id=26</code> it works alright, but if there is no ID like just <code>http://localhost/myphp.php</code> then it outputs:</p>
  
  <pre><code>The ID is
  Notice: Undefined index: id in C:\xampp\htdocs\myphp.php on line 9
  !
  </code></pre>
  
  <p>I have searched for a way to fix this but I cannot find any way to check if a URL variable exists. I know there must be a way though.</p>