//获取字符串长度,有多少个字符,空格也算
$str=" sdaf sd ";
$len=strlen($str);
<?php
$str = 'abcdef';
echo strlen($str); // 6
$str = ' ab cd ';
echo strlen($str); // 7
?>
$str=" sdaf sd ";
$len=strlen($str);
<?php
$str = 'abcdef';
echo strlen($str); // 6
$str = ' ab cd ';
echo strlen($str); // 7
?>
上篇:php输出打印函数
本文地址:https://www.freemoban.com/php/2015/0116/189.html
Copyright:www.freemoban.com 免费模板网 All Rights Reserved 网站备案:辽ICP备19014872号-2 辽公网安备:42900402000182号
免责声明:本站部分资源来自互联网收集,版权归原创者所有,如果侵犯了你的权益,我们会及时删除侵权内容,联系QQ:1615187561 谢谢合作!