Determining character length function strlen example tutorial_PHP tutorial

WBOY
Release: 2016-07-20 11:00:21
Original
1153 people have browsed it

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)
Copy after login
 
Copy after login
Copy after login
Copy after login
Copy after login
		Parameter
Copy after login
Description
string Required. Specifies the string to check
Description
string Required. Specifies the string to check
来看个简单的例子吧.
Copy after login
 
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
<!--?phpecho strlen("Hello world!");?-->
Copy after login
 
Copy after login
Copy after login
Copy after login
Copy after login
输出为
Copy after login
 
Copy after login
Copy after login
Copy after login
Copy after login
12
Copy after login

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...
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!