Current Location: Home> Function Categories> strlen

strlen

Get the string length
Name:strlen
Category:String
Programming Language:php
One-line Description:Returns the length of the string.

Definition and usage

strlen() function returns the length of the string.

Example

Example 1

The function returns the length of the string "Shanghai":

 <?php
echo strlen ( "Shanghai" ) ;
?>

Try it yourself

Example 2

Returns the length of the string "I love Shanghai!":

 <?php
echo strlen ( "I love Shanghai!" ) ;
?>

Try it yourself

grammar

 strlen ( string )
parameter describe
string Required. Specifies the string to be checked.
Similar Functions
Popular Articles