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)