Home  >  Article  >  Backend Development  >  Determining character length function strlen example tutorial_PHP tutorial

Determining character length function strlen example tutorial_PHP tutorial

WBOY
WBOYOriginal
2016-07-20 11:00:211206browse

Definition and usage
The strlen() function returns the length of the string.

Its function is to calculate the character length of a word, one Chinese character is 2

Grammar

strlen(string)
 
		Parameter
Description
string Required. Specifies the string to check
Description
string Required. Specifies the string to check
来看个简单的例子吧.
 

<!--?phpecho strlen("Hello world!");?-->
 
输出为
 
12

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/445521.htmlTechArticleDefinition and Usage The strlen() function returns the length of the string. Its function is to calculate the length of characters. One Chinese character is 2. Syntax strlen(string) Parameter Description string R...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn