Home > php教程 > php手册 > body text

判断字符长度函数strlen实例教程

WBOY
Release: 2016-06-13 11:16:56
Original
1223 people have browsed it

 

定义和用法
strlen ( )函数返回的长度字符串。

他的作用是计算字字符长度的,中文一个字为2

语法

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
来看个简单的例子吧.
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

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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template