strcspn($password, '1234567890') : strcspn « String « PHP






strcspn($password, '1234567890')


<?php
   $password = "a12345";
   if (strcspn($password, "1234567890") == 0) {
      print "Password cannot consist solely of numbers! ";
   }
?>

           
       








Related examples in the same category

1.strspn: Find length of initial segment matching mask
2.strcspn Demo
3.See what portion of a string is composed only of a given set of characters