PHP Strcspn Demo – String Function

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

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.