What is the best way to know is $_GET['example']=="somevalue"?
<pre><code>if((isset($_GET[example]))&amp;&amp;($_GET['example']=='somevalue')){ ... }
</code></pre>

<p>OR</p>

<pre><code>if((!empty($_GET[example]))&amp;&amp;($_GET['example']=='somevalue')){ ... }
</code></pre>

<p>OR just</p>

<pre><code>if($_GET['example']=='somevalue'){ ... }
</code></pre>

<p>I am asking that why I have seen many example where people check first if $_GET['example'] is set and then if $_GET['example']=='somevalue' ( first and second example above ). 
I don't understand why not just use the last solution ( if  $_GET['example']=='somevalue' then $_GET['example'] is obviously set ).</p>

<p>This question refers to any other variable ( $_POST, $_SERVER, ecc ).</p>
