title: Ending Up With Same Value With STRPOS
body: <p>strpos is returning the same value for all outcomes:</p>
  
  <p>here is the code:</p>
  
  <pre><code>&lt;?php
  $test = strpos('{', $_GET['var1']) !== FALSE &amp;&amp; strpos('}', $_GET['var1']) !== FALSE;
  
  if( $test ) {
      $value = "yes";
  }else{
      $value = "no";
  }?&gt;
  &lt;?php echo $value ?&gt;
  </code></pre>
  
  <p><strong>URL1:</strong> <code>http://example.com/test.php?var1=testingstrpos</code></p>
  
  <p><strong>URL2:</strong> <code>http://example.com/test.php?var1=tes{tingst}rpos</code></p>
  
  <p><strong>URL3:</strong> <code>http://example.com/test.php?var1=testingst}rpos</code></p>
  
  <p><strong>URL3:</strong> <code>http://example.com/test.php?var1=te{stingstrpos</code></p>
  
  <p>URL1's Value should be <code>yes</code>, while URL2, URL3, and URL4 should be <code>no</code> since there is either <code>{</code>, <code>}</code>, or both <code>{</code> and <code>}</code> in the string. I'm currently getting the value <code>no</code> for everything.</p>
  
  <p>How do I correct this?</p>