How to write regular expression for following conditions:
- Should have only numbers
- Must be 8 digits long
- Must start with 8 or 9 or 6
So for I can do only for first two conditions. I am not sure how to do the third conditions My code is
if (!preg_match('/^[0-9]{8}$/', $number))