Free PHP Tutorials

home
Stay at Home and Learn

strlen( )

 
Computer Tutorials List

 

 

 

 

 

Gets the length of a string. The length is how many characters in the string:

$string_length = strlen("This is some text");

The above line of code returns a value of 17 - the number of character and spaces in the string.