
php获取字符串长度函数strlen和mb_strlencount() - 计算数组中的单元数目,或对象中的属性个数strlen — 获取字符串长度,一个汉字为3个字符mb_strlen() - 获取字符串的长度
-----------
int strlen ( string $string )
成功则返回字符串 string 的长度;如果 string 为空,则返回 0。
范例
注意:
strlen() returns the number of bytes rather than the number of characters in a string.
strlen() returns NULL when executed on arrays, and an E_WARNING level error is emitted.
立即学习“PHP免费学习笔记(深入)”;
更多PHP相关技术文章,请访问PHP教程栏目进行学习!











