title: PHP: Check does email contains "@" and "."
body: <p>Im new in php and this should be a easy to make, but I dont now how. 
  I want to check does $address has characters "@" and "."</p>
  
  <pre><code>&lt;?php 
      function testEmail($address){
          $a = strpos("/@/", $address);
          $b = strpos("/./", $address);
          if (($a != false) &amp;&amp; ($b != false)) {
              echo "Email is OK";
          } else {
              echo "Email is NOT OK";
          }
      }
      testEmail("testmail@gmail.com");
  ?&gt;
  </code></pre>