PHP Strspn.Php – String Function

<?php
   $password = "1111111";
   if (strspn($password, "1234567890") == strlen($password))
      echo "The password cannot consist solely of numbers!";
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.