Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • STRSPN()function in PHP

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 286
    Comment on it

    Hello Reader's ,

    Today on My blog, We will discuss about the STRSPN().

    What is STRSPN()?
    The STRSPN() function compares two string to determine how closely related they are to each other. This is accomplished by returning the length of the first string containing characters that are also located in the second string.

    Example:

    <?php
    $password = "12345";
    if (strspn($password, "1234567890") != strlen($password)) :
         print "Password cannot consist solely of numbers!";
    endif;

    I hope this will help you. Please feel free to give us your feedback in comments.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: