Home >> PHP >> strspn() function in PHP

strspn() function in PHP

The strspn() function used for finds the length found in the string that contains only characters from the charlist parameter.

Syntax

strspn(string,charlist,start,length)

Example

echo strspn("abcde","abc");

Output

3

Post Your Comment

Next Questions
strstr() function
strtok() function
strtolower() function
strtoupper() function
strtr() function
substr() function
substr_compare() function
substr_count() function
substr_replace() function
trim() function
ucfirst() function
ucwords() function
wordwrap() function
array
Array type
Numeric array
Associate array
Multidimensional array
array() function
array_change_key_case() function
array_chunk() function
array_combine() function
array_count_values() function
array_diff() function
array_diff_assoc() function

Copyright ©2022 coderraj.com. All Rights Reserved.