title: email and mobile number validation in single input type using php
body: <pre><code>&lt;form action=demo.php method="post"&gt;
  &lt;div &gt;
          &lt;label class="control-label" for="email"&gt;Your email address/Mobile number&lt;/label&gt;
          &lt;div class="controls"&gt;
              &lt;input type="email"  name="email" required /&gt;
  
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;input type="submit" name="submit"&gt;Submit&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I want to validate Email or Mobile via PHP validation with preg with single input and Mobile starts only 7,8 &amp; 9 and only should be 10 digit.
  How can i validate this only in PHP.</p>